Check user capabilities or roles when registering the navigation menu. The data will remain accessible via wp_nav_menu, but users without the capabilities won’t see the location in Appearance -> Menu -> Manage locations.
Note this will only prevent assigning menus to these locations. Any menu assigned to the location already will be manageable (if the user has the capability). To resolve this you can access the filter “wp_get_nav_menus” to strip menu items from the select menu drop down.
Related Posts:
- Adding an Arbitrary Link to the Admin Menu?
- How do I add nested categories to drop-down menu in twenty-eleven?
- How to add ul class on nav
- Show menu item description with line breaks
- Remove/Disable “Automatically add new top-level pages to this menu”
- Which settings/options are saved on a theme-basis and how does this affect theme-switching?
- WordPress Add javascript:void(0); to menu link item?
- Does WordPress create mobile menus automatically?
- how to assign more permission to wordpress author
- Hide menu item based on user’s custom capability
- Programmatically create and place a nav menu in a theme location?
- Create search form in menu as in Twenty Fourteen theme
- Why is my menu not ordered properly?
- Allow users with Editor role to edit menus (without a plugin)
- My menu bar dissapeared with autooptimize [closed]
- Cant add menu items with my theme
- Make nav-menus.php available for editor
- How to override the theme home page?
- How to remove menu installed in wp-admin by a theme? [closed]
- Change submenu markup
- Change hyphen/dash for vertical line in menu [closed]
- How should I build a custom menu walker for this setup?
- How to re-arrange the MENU of “Allure Real Estate Theme for Placester” wordpress theme?
- How to override menu markup?
- Want to add different text after each menu item
- Automatically Display Sub Menu
- Menu separator appearing on next line
- Full screen nav menu block with avada theme
- How to hide the menu item created by the theme in WordPress admin panel?
- Creating custom menu with custom themes
- Removing Submenu from Menu
- Efficient wp mobile menu
- How to show submenu of any page in main menu
- cannot get global $menu value in form request
- adding pages in underscores.me theme
- Structuring Nav Menu and Background Custom page (Help)
- How to work with a custom theme that someone else created before me? (details below)
- Does the Default theme of WordPress like 2016, 2017 and 2019 uses Walker_Nav_Menu Class
- WordPress Menu Navigation links not working
- Menu doesn’t open on mobile
- I can´t make the menu unclickable in an easy way
- WordPress theme editor not showing
- Making my main menu a hamburger menu on all platforms
- menu change after theme change
- menu mobile show up even i in desktop mode in Newspaper Theme
- All custom links suddenly lack href attributes
- Making wordpress menu horizontal [closed]
- Add a Submenu from Another Submenu in a Custom Theme
- wp_nav_menu in 3.7 add name class nav navbar-nav
- how to keep theme background image, menu or site header image while moving site in sub directory?
- Make title bar collapse when scrolling
- How to add or remove borders in navigation menu?
- Customizing Responsive Themes Menu [closed]
- Some informations about the use of statics pages in WordPress
- How can I added the post’s Categories to the site’s top menu (like a page)?
- The menu jumps a few pixels after the website loads
- How do I add a search box to the nav menu?
- How to move parent li to end of child ul
- How to fix strange 500 Error after Editing Menu?
- Remove ‘Menus’ from Twenty Sixteen theme Customizer
- Custom nav walker with different output depending on depth
- Override custom menu widget
- Placing widget to menu
- container_class doesn’t seem to be working
- Get menu item slug
- Walker_Nav_Menu: Items not nested correctly
- Loop through Navbar, Output Icons
- Custom Walker anchor tag not inheriting attributes
- Partial refresh of menu in customizer not working?
- next_post_link() on custom menu structure
- Custom walker with hashes instead of links (one-page layout)
- wp_nav_menu() showing list in a different Position?
- Getting the current menu item id from specific menu
- Adding an admin menu page showing the link twice – how to solve this?
- My Temptation theme is showing two of the same menu at the top. How do I remove the one that the theme comes with? Please help! [closed]
- How to align last 3 menu items to the right – WordPress main menu [closed]
- add_filter for where statment issue
- how to insert data in li tag of navigation
- Removing a page from the header menu
- WordPress Login/Logout Single Menu Only
- If child is active add class to parent in customWalker
- 500 Internal Server Error when Trying to Save Menu [closed]
- How to add CSS class to and and id in a nav menu with code?
- Roles see different top menu (nav menu)
- Where to place a svg chevron down in my custom walker?
- Output existing wp_nav_menu with a custom walker
- Adding span to a particular text in an menu item
- How can I create this menu with wp_nav_menu()?
- How to know which menu trigger a link?
- How to get the title of root li element
- Avoid changing menu query with suppress_filters => false
- Set a different home link in nav menu
- Remove link from Page name in navigation bar
- Setting up menus before making a template live
- Is it possible to add a superscript trademark symbol to a menu?
- Creating a Horizontal menu
- I want my homepage navbar to have different styling to the rest of my site, how can I do this?
- Primary menu shortcode name
- register_nav_menus and wp_nav_menu issue, not displaying independent menus
- Problems with the navigation menu