Customize WordPress help

If you’re using WordPress, you already know about that little help tab on top of your screen which can guide you through some basic WordPress options. This little tips from developers can help you if you’re a new user or even remind you about stuff you don’t use WP on a regular basis.

Since most of users have already adapted to that help system, it would be nice if you could edit the help tab and insert tips of your own, right? This comes in handy if you are developing a new theme or if you have customized an exiting one and if you’re planning on handing out the theme to a client.

Instead of (or in addition to) creating new help file, you can take the advantage of existing help file and customize it to your needs.

In this article, we’re about to show you how to insert your own tips and tricks on top of the administration screen. As you will see from the code, you can easily choose where to show new tips so you can, for example, show a tip or two only on “New Post” screen where you want to warn user about title length, forbidden words or about new feature that you have implemented into the theme.

Let’s start:

  1. Find your functions.php file and open it
  2. Copy and paste the code below which you will edit to suit your needs:
  3. add_action('load-page-new.php','add_custom_help_page');
    add_action('load-post-new.php','add_custom_help_page');
    function add_custom_help_page() {
    add_filter('contextual_help','custom_page_help');
    }
    
    function custom_page_help($help) {
    echo $help;
    echo "<h2>This is Custom Help</h2>";
    echo "<p>Write your help tips here.</p>";
    }
  4. Change pages on which you want your tips to displayed on (explained further in this article)
  5. Save changes

The code is now ready to be executed but you still need to make changes in the step #3.

In the first two lines, you can find out that only two administration pages are will be affected by the code. First one loads “New Page” while the other one loads “New Post” page. You can change that to any page where you need your custom help to be displayed:

  1. Open administration page which you want to hook to the help page
  2. In the address bar, find out the name of the file. For example, for, if you open “All Posts” page, you will see the name of the file is “edit.php”. For “Add New Media” it will be “media-new.php”, etc.
  3. Take the file name and change it in those first two lines. If you want to show the custom help in “Add New Media”, your code would look something like this:
add_action('load-media-new.php','add_custom_help_page');

To write your actual help/tips, change the text in the custom_page_help function. The actual text your users will see is the text found next to “echo” language construct.  Write anything you want in there and style the text to your needs.

That’s it; now you have your own custom help system which users will be able to access anytime.

START YOUR OWN BLOG

This guide is an introduction to mastering the art of blogging. It provides easy to follow steps to start, maintain, and grow your blog.

Read the guide

Leave a Reply

Your email address will not be published. Required fields are marked *