Adding extra pages to plugin that shouldn’t appear in the sidebar
If you need admin pages that don’t appear in the menu, use add_submenu_page and set $parent to null. This will create a functional page that doesn’t get rendered in the menu. add_action( ‘admin_menu’, ‘wpd_hidden_plugin_submenu_page’ ); function wpd_hidden_plugin_submenu_page() { add_submenu_page( null, ‘My Hidden Submenu Page’, ‘My Hidden Submenu Page’, ‘manage_options’, ‘my-hidden-submenu-page’, ‘my_hidden_submenu_page_callback’, ); } Users will … Read more