Add Help to WordPress Admin Menu

When I create sites for clients, I like to give them as much information as I can. I create video tutorials for them that show how to use their new site. I’ve gone about supplying these tutorials and general information they should have in various ways. What I have ultimately decided to do now is to simply create a link to a help page within the site itself that contains everything they need. This keeps it all centrally located and makes it available to whomever they would like to manage their site.

To accomplish this in WordPress I have created a tiny custom plugin. All it does is add a Help link to the admin menu that goes to a backend page with all of their stuff. Since it is a plugin, I can reuse it over and over and just customize the text needed for each site. I could theoretically use a regular page on the site for all of this but I like keeping it in the admin section and I have easy control over who gets access to it by user level. I set it to a default of user level 5 for access since this is the level where folks can create new posts and pages and will be in need of the tutorials.

Now I am not a plugin writer. I have only dipped a toe in once or twice and prefer to use already established plugins for my needs. This is a really, really simple plugin to “write” so even if you aren’t very comfortable with PHP or know nothing of WordPress plugins, this is really easy to use and figure out what to edit. The code is taken verbatim from the WordPress codex on Menus.

Here is the skeleton of what I use:

Plugin Name: Help Menu
Description: Adds a site help link to the admin menu
Author: Addison Berry
// mt_add_pages() is the sink function for the 'admin_menu' hook
function mt_add_pages() {
    // Add a new top-level menu:
   // The first parameter is the Page name(Site Help), second is the Menu name(Help)
   //and the number(5) is the user level that gets access
    add_menu_page('Site Help', 'Help', 5, __FILE__, 'mt_toplevel_page');
// mt_toplevel_page() displays the page content for the custom Test Toplevel menu
function mt_toplevel_page() {
    echo '
    <div class="wrap">
      <h2>Site Help</h2>
      <p>This page contains information and tutorials that are specific to your site.
      If you have trouble with anything on this page contact Addison Berry of
      <a href="<a href="">rocktreesky</a>" rel="nofollow">">rocktreesky</a></a> by sending an email using the <a href="<a href="">
" rel="nofollow">">
</a>      rocktreesky contact form</a>.</p>
      <h3>Quick Questions</h3>
      <h4>I don\'t want people to see the edit link/be able to edit my site!</h4>
      <p>Those edit links only appear to you when you log in to the site as the admin.
      The public will NEVER see them and even other users with accounts won\'t see
      them unless you give them the rights to be able to edit something.  To get rid of
      the links when you visit the site you must Sign Out of the admin account.  You
      can do this from the administration pages in the upper right-hand corner.</p>
      <h3>Video Tutorials</h3>
      <p>Please note that these tutorials require a Flash Player, available to
      <a href="<a href="">
" rel="nofollow"></a>      download for free from Adobe</a>.</p>
        <li><a href="/wp-content/uploads/filename.swf">How to edit existing pages</a></li>
        <li><a href="/wp-content/uploads/filename.swf">How to create a new page or post</a></li>
// Insert the mt_add_pages() sink into the plugin hook list for 'admin_menu'
add_action('admin_menu', 'mt_add_pages');

So, obviously you would change out the stuff that is specific to my site, mainly the html content between the echo ‘ and ‘; lines, and then just save it with a name that won’t conflict with other plugins you use (e.g. siteHelp.php). Load it up like any other WordPress plugin, activate it and you should see a Help link at the end of the admin menu. Easy-peasy.