Make sure that your add_action
hook is set to admin_menu.
Here’s a sample code:
add_action('admin_menu', 'wpse149688');
function wpse149688(){
add_menu_page( 'Wholesale Pricing', 'Wholesale', 'manage_options', 'woo-wholesale', 'woo_wholesale_page_call');
add_submenu_page( 'woo-wholesale', 'Registrations', 'Registrations', 'manage_options', 'woo-wholesale-registrations', 'wwpr_page_call' );
}
Also check whether user you’ve logged in as has the ability to view this menu. As this menu is set using manage_options
capability.
Related Posts:
- How is a widget supposed to reference what is added to custom submenu or addmenu fields?
- Highlighting admin submenu pages
- add_menu_page() with different name for first submenu item
- The seventh parameter passed to add_submenu_page()
- Return value of add_menu_page
- How to change menu page capability
- add_menu_page with no link
- How to avoid creating first submenu page that is same as menu page?
- How to point “add_menu_page” to HTML file rather than PHP function
- Hiding Admin Page While Keeping Menu Expanded
- Insert & order custom post types in/as submenu
- Auto add (multiple) Custom Post Types to menu
- add_menu_page the children get url encoded prefix
- Is there documentation reference for forms in menu and setting pages?
- add_menu_page include a php page from theme directory
- WordPress add page under admin submenu and retaining the active status of the parent submenu page in the menu
- Show category and tag link as a submenu under custom post type submenu
- Adding submenu to custom plugin menu page created with add_menu_page() function
- How to Call Specific .PHP file on add_submenu_page selection in Plugin Development?
- How to add styles to a submenu page?
- Not able to show the add_menu_page icon
- How to get data from option page [closed]
- usage of admin_url() in add_menu_page()
- Add Admin menus or submenus depending on conditions
- Multiple plugins settings of same developer into ONE settings page linked together
- Add submenu page to a custom menu page
- How to Add a Sub Menu Page to a Custom Post Type?
- do_shortcode() within Admin Page
- Check if add_menu_page exists or not
- Add an admin page, but don’t show it on the admin menu
- Plugin – create a page without it appearing in the side menu
- Show Custom Taxonomy Inside Custom Menu
- Add menu and submenu in admin with a URL instead of slug?
- add_menu_page permissions – what am I doing wrong?
- How to add custom submenu links in wp-admin menus?
- Add custom page link with anchor
- add_submenu_page() link missing ‘admin.php?’ prefix
- How to remove duplicate link from add_menu_page
- How to use a WordPress’ existing admin icon?
- How to create sub menu with a URL parameter?
- What is the use of $page_title and how to use it?
- How to link a Custom Post Type submenu to a Nextgen Gallery page?
- How to give position to Submenu under custom post type
- How to add a child item to a menu element (using wp_nav_menu_objects)
- Menu capability in WordPress
- Adding an admin page – OOP approach not working
- Generate Advanced Custom Fields box in custom admin menu page
- Add Settings to Custom Post Type
- Add highlighting to new Admin Dashboard Menu Item
- How to add a sub menu with AJAX?
- difference between add_object_page and add_menu_page
- Hooking into add_submenu_page
- How to add more than 1 user role to sub-menu pages
- Master menu item for multiple plugins?
- Odd behaviour with submenu link creation
- Prevent Admin gui output from page added using add_submenu_page
- Seriously stuck with some custom meta box/plugin stuff
- How can I add a sub menu to an existing navigation menu in WordPress?
- How to prevent parent admin page from appearring as a child admin page
- Admin Menus – Name Menu different from first Submenu [duplicate]
- add_menu_page() with function inside a class [duplicate]
- Enqueueing Scripts on a Custom Top-level Menu Page
- add_submenu_page callback a file instead of a function?
- Settings page above CPT page in admin section
- Programmatically adding menu items function replicates in multiple menus
- add_submenu_page set for multiple roles [duplicate]
- add_page_menu to make shortcut to widgets
- Theme Options page not showing up in admin menu
- add_sub_menu page() to be replaced by add_theme_page()
- How do I add a Gutenberg editor to a custom options page
- How to change page via login as user and admin
- Why add_menu_page adds admin.php and how to remove it?
- Admin Dashboard with Custom Tab for Client
- Is there any way to add absolute path for add_menu_page function?
- Why is the Page Title missing on Pages added with add_submenu_page?
- add_menu_page() for more than one user role
- Change top level menu item to point to custom submenu item
- Where is the submitted $_POST array stored after an option page submission?
- How to add custom menu item on plugin activation?
- Associating custom submenu item with post type of top level menu item
- Wp menu add page link as custom empty link
- What is the callback sent to add_submenu_page() invoked by WordPress?
- Admin Panel – Custom Menu Sub-Item LINK
- Determine Registered Admin Menus
- Add submenus to Theme options menu
- Adding subdomain to home_url for “add_menu_page”
- How to add a custom taxonomy to show up in a custom post type menu?
- Sub Menu content is being duplicated
- add_menu_page does not seem to work in a class
- Wrong current class on admin menu with add_submenu_page()
- how to open page, defined in plugin, from dashboad widget
- add_submenu_page function to show videos table
- Problem with change url for all subpages (.htaccess)
- Set different custom menu items for different user roles
- Check if Page Already Exists in Menu
- Add_menu_page not displaying the menu in class based plugin
- Able to edit custom post, but unable to create new custom post when within submenu. What capability is missing?
- add multipe sub menus using add_submenu_page
- Add menu option to “New Post” menu in admin bar
- Role capability issue