I am currently using add_submenu_page to add pages for my plugin. However, I wish to create a page that don't appear in the admin menu, is that possible?

1 Answer 1


Set the parent_slug property to null, example;

          null            // -> Set to null - will hide menu link
        , 'Page Title'    // -> Page Title
        , 'Menu Title'    // -> Title that would otherwise appear in the menu
        , 'administrator' // -> Capability level
        , 'menu_handle'   // -> Still accessible via admin.php?page=menu_handle
        , 'page_callback' // -> To render the page

This will hide the sub menu page from your parent (top level) menu link.

It does not state this in the Codex entry for add_submenu_page though.

It now states this in the Codex entry for add_submenu_page (thanks goto Ian Dunn).

  • 1
    It does now :) It only takes a minute to update it.
    – Ian Dunn
    Sep 15, 2012 at 9:20
  • Good lad, thanks. I was trying to do that but having trouble with log-in.
    – Adam
    Sep 15, 2012 at 9:44
  • 1
    You can also set the parent page to options.php to achieve the same effect.
    – Pippin
    Sep 15, 2012 at 19:55
  • Thanks @Pippin, I've also added that to the Codex with example code.
    – Adam
    Sep 15, 2012 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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