The “Help” tab is a very underused, under rated, but fantastic tool for all plugin developers. If you’re not familiar with it, the “Help” tab is a little button in the top right corner of your WordPress dashboard that, when clicked, will bring in a nice slide-down panel with helpful information.
[box style=”notice”]This is a quick tip. Check out more Quick Tips[/box]
Though most plugins (and themes) do not make any use of the Help tab, it is a fantastic way to provide easy-to-access information for your plugin. While on a plugin settings page, the help tab should contain information that assists the user in figuring out how to configure your plugin, or other necessary information.
So here’s how to add your own contextual help information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?php function pippin_contextual_help($contextual_help, $screen_id, $screen) { ob_start(); ?> <h3>Help Section Title</h3> <p>This is text that provides helpful information</p> <?php return ob_get_clean(); } if (isset($_GET['page']) && $_GET['page'] == 'your-plugin-settings-page') { add_action('contextual_help', 'pippin_contextual_help', 10, 3); } |
You will need to replace “your-plugin-settings-page” with the slug of your settings page. This is the slug set through the add_menu_page() or add_submenu_page() functions.
If you don’t feel like coding the contextual help tab yourself, there is a great plugin available from Code Canyon.net from the Right Here development team that provides a great interface for adding contextual help information.
Do you use the Help tab in your plugins or theme? You should be.
[box style=”notice”]An extension of this tutorial has been added here.[/box]
[box style=”notice”]Note: this works differently in WordPress 3.3[/box]
Is there a similar process to follow to change the default contextual help content on other admin panels (pages, posts, widgets, etc.)?
FYI, I agree that plugin from Right Here is terrific!
@Drew – you should be able to simply append extra info to those admin pages by using the .= operator instead of =
Thanks Pippin, that’s just beyond my paygrade but I’m sure I can probably figure all of it out.
On a larger discussion, given the direction wordpress has grown over the years, it would be wonderful if they started to include admin panel level control over these types of items.
In the meantime, if you ever decide to write a tutorial about the process you mentioned, I’d be grateful.
@Drew – I’ll see about writing up an in-depth tutorial sometime this week.
Fantastic, thanks!
Pippin is the man!
Pingback: Modify the Contextual Help Tab on Any WordPress Admin Page | Pippin's Plugins
@Drew – I have just published an extension to this tutorial that describes how to modify the help tab on any WordPress admin page: https://pippinsplugins.com/modify-the-contextual-help-tab-on-any-wordpress-admin-page/
Pingback: Add Contextual Help Screens to the WordPress 3.3 Help Tab | Pippin's Plugins