This video will give you a quick demonstration of how to modify the Contextual Help tab on any WordPress admin page. This trick is particularly useful for users wishing to add extra information to an already-existing help tab, such as the one on the Themes or Plugins page.

[box style=”notice”]This tutorial is an extension of the quick tip on adding Contextual Help Tabs to your plugin.[/box]

To assist you, here is the code used in the video.

1
2
3
4
5
6
7
8
9
10
11
12
function pippin_contextual_help($contextual_help, $screen_id, $screen) {
	// replace edit with the base of the page you're adding the help info to
	if (strcmp($screen->base, 'edit') == 0 ) {
 
		$customized_help = $contextual_help . 'Here is some very useful information...';
 
		return $customized_help;
	}
	// Let the default WP Dashboard help stuff through on other Admin pages
	return $contextual_help;
}
add_action('contextual_help', 'pippin_contextual_help', 10, 3);

[box style=”notice”]Note: this works differently in WordPress 3.3[/box]

  1. Pippin

    @Drew – Just so you know (you’re one of the first), I’ve just added a registration form to the site. By joining you will get the ability to bookmark your favorite tutorials, and also access to members-only content I will be releasing soon.

  2. Drew McManus

    Terrific tut, and you do make it look very easy but this is something I’ve been looking for for a long time so thank you very much for taking the time to do the screencast (IMHO, you should put a paypal tip jar up in your sidebar or footer).

  3. Pippin

    Glad it was helpful and I will definitely consider putting a tip jar in 🙂 Oh, and thanks for registering! I’m just getting it going, but pretty soon I’ll be putting up a lot more member-only content.

  4. drewmcmanus

    Excellent, I really appreciate sites that are instructional in nature but aren’t so simple as to have to explain what a menu item is but not so advanced that I need a degree in programming degree. I also get tired of how often many tut sites are opting for long, drawn out, over-explained tutorials as opposed to what this is which is a short, simple, and straightforward style of screencast.

  5. deckerweb

    Hi Pippin, this tutorial is awesome! Will use it for my new plugin, very handy 🙂 Membership here is also a nice extension. I really follow and support your work – keep it up 🙂

    • Pippin

      @deckerweb – Thanks, glad you like it! What’s the plugin? Also glad to hear you like the membership. I’m going to be expanding it a lot in the next few weeks / months.

  6. deckerweb

    @Pippin – A little plugin primarily for Genesis Framework to handle social profiles 🙂 Will be on WP.org soon.

  7. Pippin

    @Deckerweb – Sweet. You should send it to Travis Smith — @wp_smith — once finished. He’s a hard core Genesis guy

  8. deckerweb

    @Pippin – Yeah, I know him already, I will make some kind of public beta so I guess he will have a look into it 🙂

  9. Pippin

    @deckerweb – Nice.

  10. deckerweb

    How can I add more lines to it? – I want that: menu page, and there after the regular content, and just a few lines with paragraphs. It should be all one content block so not mixed up with the existing content.
    Reason: I need that this way because I localize the plugin and that way don’t want to mix all paragraphs/divs/space lines into the lang strings…
    Is that possible? Would be awesome! 🙂
    (Ok, it works all my text/code just in one line but could be a bit confusing for translators to translate such a huge code/lang block…)
    Thanx for any help 🙂

    • Pippin

      @David – I’m not completely sure I’m following what you’re trying to do. Are you just trying to break your text into multiple lines? If so, just use the <p> tag.

  11. drewmcmanus

    Thinking ahead here, is there a prescribed method to keep the customizations from getting overwritten during regular WP updates?

  12. Pippin

    @Drew – as long as your function that modifies the help tab is in your theme’s functions.php, or, even better, inside of a custom plugin, you will never have to worry about it causing problems with WP udpates, or with the updates removing your modifications. Not unless core changes the way the help tab works, which is unlikely.

  13. drewmcmanus

    Good ideas and this might be a good project for me to learn how to package up something like this in a plugin. And I bet you’ve got a tutorial for that already, don’t you?

  14. Pippin

    @Drew – I was going to publish a tutorial on how to write your first plugin today 🙂

  15. drewmcmanus

    Excellent, and if it comes with a screencast and the sort of useful reference code you have above, I know it will be a winner.

    BTW, have you checked out the new WordPress section at SmashingMagazine? the new editor there should definitely know about what you’re up to.

    • Pippin

      @Drew – No, I haven’t checked it out (except to skim it), though I’d appreciate a good word 😉

  16. drewmcmanus

    Sure, I’ve never contacted them before and they get so many comments I don’t know if they actually take the time to read them or not but I’ll do something.

  17. Richardl

    great post!

    • Pippin

      @Richard – Thanks 🙂

  18. deckerweb

    Hi there! Any tips on how to make this on WP 3.3 with its updated help tab system? – Thanx, Dave 🙂

    • Pippin

      Not yet, but I will try and play with it today

  19. deckerweb

    Thank you, Pippin! I am curious for your sulution 🙂
    In the meantime I found out that Ben Balter used interesting code in his nice “WP Document Revisions” plugin: http://wordpress.org/extend/plugins/wp-document-revisions/ –> maybe this could be some help to you also. I still wait with the update for my plugins where I used your codes – see here: http://wordpress.org/extend/plugins/profile/daveshine

    I’ve used it in “Genesis Layout Extras”, “Genesis Social Profiles Menu” and “Genesis Dashboard News”. So it’s just for prepartion for the WP 3.3.

    Thanx for all work and support! -Dave 🙂

    • Pippin

      @Dave – I’ve figured it out and will be putting up a tutorial about it later today!

  20. deckerweb

    Oh great, thanx 🙂

Comments are closed.