0

I'm trying to make a page in my plugin, but don't want it to appear in admin_menu, but just in my plugin page menu! I have a lot of pages, don't want them all to appear as sub menus! any ideas?

1
  • Try googling, that´s done before and then return with specific questions. Also please have a look at How do I ask a good question? Commented Feb 5, 2016 at 10:22

1 Answer 1

0

Use add_submenu_page and set $parent_slug to null:

add_action('admin_menu', 'wpdocs_register_my_custom_submenu_page');

function wpdocs_register_my_custom_submenu_page() {
    add_submenu_page( 
        null,
        'My Custom Submenu Page',
        'My Custom Submenu Page',
        'manage_options',
        'my-custom-submenu-page',
        'my_custom_submenu_page_callback',
    );
}
0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.