You will able to remove nav menu meta-box links from screen option but if you want to remove by custom code, please try below code, simply copy and paste this into your functions.php file:
function custom_remove_menu_link_types() { global $wp_meta_boxes; foreach ($wp_meta_boxes['nav-menus']['side'] as $nav_menus) { foreach ($nav_menus as $nav_id => $nav_menu) { // remove all menu's and keep only one if ($nav_id !== 'add-custom-links') { remove_meta_box($nav_id, 'nav-menus', 'side'); } } } } add_action('admin_head-nav-menus.php', 'custom_remove_menu_link_types', 10);
Related Posts:
- Display a portion/ branch of the menu tree using wp_nav_menu()
- Unregister Nav Menu from Child-Theme
- Display only page specific sub menu items using Custom Walker
- Keeping parent menu items active in child pages
- Way to bulk delete menu items in new 3.x Appearance > Menus system?
- Pass a parameter to a menu walker
- Menu is not visible in appearance
- Customize the menu by adding items
- Ways to give a wp_list_pages menu link specific class names?
- I want remove last after wp_nav_menu
- Organizing by super-categories (or nested categories)?
- Adding first and last class to Menu on top level only
- wp_list_pages – show pages immediately 1 level below current level
- wp_nav_menu log in/out link?
- Add within the output of
- How do I get my wp_nav_menu single category page to highlight the parent?
- How to insert custom code into wp_nav_menu structure?
- How to add custom menu item on plugin activation?
- Outside the loop, how can I echo the current page’s menu title?
- getting parent page id when using custom menu.
- Use menu class in walker function
- Menu link to all posts (all categories included)
- How do you return a menu with the menu name?
- Change name & menu_name for Profile in the default menu, w/o altering core files?
- wp-menu ‘automatically add custom taxonomy terms’ like it does for pages? [closed]
- You do not have permission to create Navigation Menus – Twenty Twenty-Two theme
- SlickNav – Google Lighthouse Accessibility issue for collapsed menu button
- Creating a navigation menu to see where you are on your website
- current-menu-item class in CSS
- Put class on instead li
- Tiles as a navigation
- Custom format nav menu only using div and a
- Sticky Header in WordPress using BootstrapWP theme [closed]
- Links do not open from click, only in new tab [closed]
- Default menu editor with automatic page list
- Switch from hover to click on Twenty Twelve Menu
- How can I switch pages?
- How to override menu markup?
- Can I have custom post types in “Add menu items” on in the Admin > Appearance > Menu
- Automatically Display Sub Menu
- Recent Posts widget missing current_menu_item class
- Adding a unique ID to each sub-menu
- WordPress custom Nav Walker
- How to get a multidimensional array of my menu?
- How to get the name of the homepage’s menu?
- In admin edit-menu screen, newly added menu items always go to the bottom of the list
- How to add search to menu?
- How to get submenu of admin menu?
- How can I make wp_nav_menu() support tags?
- wp_nav_menu without menu or theme_location specified
- active menu in post page
- What is the $menu parameter used of in wp_nav_menu()?
- Blending Foundation’s Tabs with WordPress Nav Menu & Display Active Tab
- select a main navigation menu per user type from multiple main navigation menus
- Editing the nav menu?
- How to display conditional menus with Twenty-twenty two theme (and other new block themes)?
- Keep source page URL parameters on custom link menu item
- I’m trying to remove a duplicate menu, which only appears on the homepage?
- Embedding an external webpage within a page? Is it possible, is it a good idea?
- Menu elements load very slow
- How to remove empty line space in navigation menu?
- Is it possible to get_the_post_thumbnail (Featured Image) inside a sprintf function?
- is MariaDB error related to Automatically add new top-level pages
- Add category label for appearance > menus items
- Custom items for Menus
- sidebar navigation problem with child pages not all display.?
- How to point menu to my homepage
- dot.com/car1 does work, but dot.com/transport/car1 doesn’t work
- code to add an extra selection to the menu editor
- WP pages content is missing in frontend
- update_post_meta breaking wp_update_nav_menu_item
- Dashicons not showed for admin menu
- How to select particular menu position in wordpress?
- Menus not visible in Appearance after being registered
- Error: Declaration of MyClass::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl()
- Cannot add home page url to menu with #
- Accidental reverse order of menu items in one menu
- Having an issue with wp_nav_menu displaying custom navigation
- Add dynamic content block to nav section generated by custom walker
- Customizing label/title output of admin nav_menu selecter
- Extend Individual Menu on Page Function to individual Submenue on Page Function?
- How do I remove a menu from a theme?
- How can I modify wp_nav_menu with walker?
- menu items outside of blog
- Walker for menus
- Custom Menu based off custom header
- How to insert date in topNav
- Change sub-menu css class
- How to add an tag when a menu item is a dropdown(or has a sub-menu) [duplicate]
- Remove “Next Post” in nav_menu
- Adding an additional menu in WordPress
- How to display a submenu as a popup when clicking a button?
- Menu not Showing on Mobile or While the page is shrinked
- My Menu Disappears on my Custom Link Homepage on Mobile
- Add A Menu Item To A WP_Nav_Menu Navigation via PHP Function
- Sub menu for a (single) page
- WordPress “add to menu” button not working
- Primary menu shortcode name
- Add acf custom fields so sub item in menus
- change breakpoint widths for divi theme tablet view