WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to add a page of content (a readme file) in the WordPress admin, I can't seem to find how to do this in the codex - can anyone point me in the right direction? It will literally just be a simple page with a few paragraphs of content.

share|improve this question
up vote 8 down vote accepted

You need just two steps:

  1. Hook into the action admin_menu, register the page with a callback function to print the content.
  2. In your callback function load the file from plugin_dir_path( __FILE__ ) . "included.html".

Demo code:

add_action( 'admin_menu', 'wpse_91693_register' );

function wpse_91693_register()
        'Include Text',     // page title
        'Include Text',     // menu title
        'manage_options',   // capability
        'include-text',     // menu slug
        'wpse_91693_render' // callback function
function wpse_91693_render()
    global $title;

    print '<div class="wrap">';
    print "<h1>$title</h1>";

    $file = plugin_dir_path( __FILE__ ) . "included.html";

    if ( file_exists( $file ) )
        require $file;

    print "<p class='description'>Included from <code>$file</code></p>";

    print '</div>';

I added an example to my demo plugin T5 Admin Menu Demo to show how to do this in a sub menu and in a OOP style.

share|improve this answer
Just tried this and looks awesome but is there any way to have this in the submenu from my custom post type? as opposed to it being a menu for itself. – user319940 Mar 21 '13 at 13:07
Ive tried 'show_in_menu' in the custom post type but this then has a menu which doesn't show the page and doesn't show "add new" for the custom post type either. – user319940 Mar 21 '13 at 13:20
Solved! for anyone else try add_submenu_page and just add the extra parameter for parent slug, as outlined here: codex.wordpress.org/Function_Reference/add_submenu_page – user319940 Mar 21 '13 at 13:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.