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
- Plugin – create a page without it appearing in the side menu
- Add menu and submenu in admin with a URL instead of slug?
- Add custom page link with anchor
- How to use a WordPress’ existing admin icon?
- 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?
- Adding an admin page – OOP approach not working
- Odd behaviour with submenu link creation
- Seriously stuck with some custom meta box/plugin stuff
- How can I add a sub menu to an existing navigation menu in WordPress?
- add_submenu_page callback a file instead of a function?
- How to change page via login as user and admin
- Admin Dashboard with Custom Tab for Client
- Associating custom submenu item with post type of top level menu item
- What is the callback sent to add_submenu_page() invoked by WordPress?
- Admin Panel – Custom Menu Sub-Item LINK
- Add submenus to Theme options menu
- How to add a custom taxonomy to show up in a custom post type menu?
- Sub Menu content is being duplicated
- how to open page, defined in plugin, from dashboad widget
- Problem with change url for all subpages (.htaccess)
- 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?
- Adding a submenu to the Tools menu returns tools.php in a popup box
- Register submenu on network menu from the subsite
- plugin admin subpage title and links in menu not highlited at current page
- Dynamic admin submenu
- Add a page in admin without adding menu item
- Howto check version of another plugin and then add a submenu page to it
- Add new button to WP backend menu
- Create dynamic wordrpess blank page
- What’s the correct way of moving a menu page to a submenu
- How to use add_submenu_page() for editors?
- Add menu item to edit specific page
- Issue on Setting $icon_url Parameter on WP add_menu_page()
- Visiting a console submenu page does not expand its parent menu item
- 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
- Plugin page and capabilities
- 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?
- Why won’t this submenu page show? – My First WordPress Plugin
- Custom admin menu order fails if slugs are complicated
- 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
- Error on add_submenu_page() declaration
- Highlight active Admin Menu when added though add_menu_page
- Menu with sub-items but without link
- Submenu Page under Settings in Admin Panel
- Admin menu hilighting wrong item for CPT
- Create WordPress Menu Item Without Linking to a Custom Page
- How to have submenus collapsed until they are clicked?
- How to create a custom menu for specific user
- Admin submenu does not call function to load the page
- Create an administation subpage containing posts in a certain category
- Can’t save multiple sections on one page with register_setting
- 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 add a menu page for options in wordpress for user that has the role of vendor?
- How to check an admin submenu already exists?
- Is it possible to have dynamic post id # in add_menu_page()?
- Cloning admin pages like users.php
- Post to type posts in subdirectory. [closed]
- edit-tags.php in plugin admin menu hides when is the active page
- The menu item is not deleted on WordPress
- TGM plugin error in Theme Check Plugin
- Footer navigation menu
- Is it possible to add Custom Dashboard Widgets to Custom Admin Menu Page?
- Change default URL (or permalinks) in the back-end