Submenu Page under Settings in Admin Panel

I didn’t test this but i’m pretty sure you just need to remove your code from the admin_menu() function declaration. Like this: add_action(‘admin_menu’, ‘register_my_custom_submenu_page’); function register_my_custom_submenu_page() { add_submenu_page( ‘tools.php’, ‘Submenu Page’, ‘My Custom Submenu Page’, ‘manage_options’, ‘my-custom-submenu-page’, ‘my_custom_submenu_page_content’ ); } function my_custom_submenu_page_content() { ?> <div class=”wrap”> <h2>Page Title</h2> </div> <?php }

How to add all subcategories as submenu in WordPress menu

For menus this large, it’s usually more efficient to use functions like wp_list_categories() (which can also output custom taxonomies like Product Categories) in whatever theme template you need to affect. Bonus: your menu will always be current, because unlike a static WP Nav Menu, this will always pull all Product Categories and not need manual … Read more