Just use remove_submenu_page( $menu_slug, $submenu_slug );
.
$menu_slug
= Parent page$submenu_slug
= Submenu page
Example usage:
// Remove the submenu page for widgets
add_action( 'admin_menu', 'adjust_the_wp_menu', 999 );
function adjust_the_wp_menu()
{
remove_submenu_page( 'themes.php', 'widgets.php' );
}
Related Posts:
- Changing the Order of Admin Menu Sections?
- Adding an Arbitrary Link to the Admin Menu?
- Add separator to admin submenu
- Renaming a WordPress Admin Menu
- How do I fix this error: Warning: invalid argument supplied for foreach()?
- How to add menu to Dashboard that can be viewed by all users
- Make Theme automatically choose default nav menu
- Move admin menu at the end
- Hide pages depending on role
- How to display custom post meta in the appearance->menus page
- How can I get an array/list of all current WordPress Admin Menu items?
- how to only add a top-level admin menu without it creating a sub-level-menu
- Remove Metabox from Menus screen
- Sort wp_nav_menu() by menu order
- Custom Admin Menu Order
- Disabling ‘posts’ in Appearance > Menus
- Hiding Admin Page While Keeping Menu Expanded
- Get admin menu link
- Hook for number of items in Appearance > Menus > CustomPostType > View All [duplicate]
- Filter for Admin Nav Menus Drop Down
- SlideDeck 2, make back-end visible for admins only
- Ad custom admin page like WordPress customizer [closed]
- Admin menu structure
- Appearance Menus Screen – menu item drop down menu not functioning
- Adding an admin menu page showing the link twice – how to solve this?
- Admin-ajax.php 500 error when Add to menu is clicked in admin
- Can I have custom post types in “Add menu items” on in the Admin > Appearance > Menu
- Add Labels to Admin Menu ( How To )
- How can I make a menu link visible only to admins (without plugins)?
- Limit wp_nav_menu_objects() only to first-level menu items
- Adding top level items in the admin menu that link to a post
- How to get submenu of admin menu?
- Strange menu behaviour wordpress admin [duplicate]
- Adding CSS-class to WordPress Menu in backend
- Menu deletes all items and position – wordpress bug?
- Plugins & Setting Menu Items Removed From Admin Panel
- add_menu_page does not render the expected result
- Admin Menu Hack (Left side in Dashboard)
- Lost admin “manage_link” capability WordPress. No “Links” menu item in admin menu
- Admin menu in different languages
- Need to remove the admin menu item from a be theme in wordpress
- Add category label for appearance > menus items
- Removing wp admin menu item on top bar of admin backend
- Links in new menu don’t work
- wp_is_mobile() inside js
- Appearance > Menus
- Customizing label/title output of admin nav_menu selecter
- Is It Possible To A Link To The Homepage From The Admin Sidebar?
- Query for menus in backend (BE)
- List of WordPress menu item indices?
- How do I fix the URL used in the WordPress admin menu for customize.php
- How can I disable sorting/dragging of a menu item in the custom menu admin?
- How to change the markup created by menu item only on chosen items?
- How to change WP menu item type?
- Split up wp_nav_menu with custom walker
- WordPress Menu Custom Walker Class
- How to change order of menu items
- Add Commas Between Menu Items?
- Allow html tags in WordPress Custom Menus Description Field
- Show child pages by menu order using Superfish Dropdown menu?
- Bootstrap drop down menu with wp_nav_menu
- Remove nav menu or menu item
- Adding a within ‘s from wp_nav_menu()
- Make compatible custom menu widget for Twitter Bootstrap
- Different side menu on each page
- Automatically generated menu
- Variables within wp_nav_menu
- wp_update_nav_menu_item not saving in multisite API
- Header style different on home and remaining pages
- Pass GET params to URL from a main menu item
- wp_nav_menu_items filter :: custom menus fall outside ul class
- How can I add items to the menu via the PHP file?
- wp_list_pages() but only show children on the branch you are on
- Cant add menu items with my theme
- Why aren’t my post showing under my custom menu?
- remove class “sub-menu” from wordpress drop down menu
- Twenty seventeen Menu is not responsive not clickble
- remove menu items if user can’t read
- How to set classname for tag in wordpress menu?
- rearrange the posts by published date in Menu posts selection
- Setting color of specific menu items depending on page or post tag
- wp_get_archives doesn’t take effect from css or html
- Change Menu Button Text [closed]
- How to open a lightbox form from a navigation menu item
- Navigation item – current date in url
- Need help with Walker_Nav_Menu class
- Impossible to remove page from menu
- why are my walker menu is showing like this?
- Menu with sub-items but without link
- Creating navigation out of specific IDs and their children?
- Add active class to wp_nav_menu
- how to configure this type of menu
- Migrate WP Menu between sites
- Show Child of Parent Page including all other parents
- Is there a limit to number of pages displayed for selection in custom menu?
- Add monthly archives menu and submenu
- wp nav menu – highlighting current page not working properly [closed]
- Sub menu for a (single) page
- Add acf custom fields so sub item in menus
- change breakpoint widths for divi theme tablet view