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
- Admin adding submenu that has the same destination as the parent menu
- 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
- add_menu_page permissions – what am I doing wrong?
- How to add custom submenu links in wp-admin menus?
- How to remove duplicate link from add_menu_page
- 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)
- Add Settings to Custom Post Type
- difference between add_object_page and add_menu_page
- Master menu item for multiple plugins?
- 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
- add_menu_page() with function inside a class [duplicate]
- 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
- Why add_menu_page adds admin.php and how to remove it?
- 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?
- Wp menu add page link as custom empty link
- Adding subdomain to home_url for “add_menu_page”
- add_menu_page does not seem to work in a class
- Wrong current class on admin menu with add_submenu_page()
- add_submenu_page function to show videos table
- Add_menu_page() error message -> “You do not have sufficient permissions to access this page”
- Create dynamic wordrpess blank page
- WordPress template – How to add class to li tag if submenu exist
- What’s the correct way of moving a menu page to a submenu
- WordPress custom plugin gives error
- Add menu item to edit specific page
- Issue on Setting $icon_url Parameter on WP add_menu_page()
- WordPress Settings API Repeatable fields
- Plugin add_action and add_menu_page
- add page to main menu (frontend)
- Include script files for admin submenu page
- Adding title and description to subpage’s featured image
- How can I add/update post meta in a admin menu page?
- How to hide plugin submenu title in drop down in admin panel in wordpress?
- How to create a custom post-new.php page for plugin , no wp menu
- do_shortcode() within Admin Page
- add sub_menu to a sub_menu (multiLevel sub_menu) in admin menu in wordpress
- Two e-commerce in two different folders of the same domain
- Bootstrap Theme Migrated to WordPress
- Menu with sub-items but without link
- Admin menu hilighting wrong item for CPT
- How to create a custom menu for specific user
- Admin submenu does not call function to load the page
- add menu page in loop menu order
- how to create pages and link them to a menu
- Is it possible to use add_submenu_page() to add an item that’s a link to edit another page?
- Adding Meta Box to Specific Submenu Page
- How to check an admin submenu already exists?
- Cloning admin pages like users.php
- Post to type posts in subdirectory. [closed]
- Adding querystring variable breaks admin URLs
- Pass custom css class to add_menu_page
- and custom post_types to custom menu
- The menu item is not deleted on WordPress
- TGM plugin error in Theme Check Plugin
- Same ACF Relationship field for multiple Post Options sub-pages?
- Footer navigation menu
- Change default URL (or permalinks) in the back-end
- Create dynamic wordpress blank page