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?


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() {
        'My Custom Submenu Page',
        'My Custom Submenu Page',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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