I’ve made a free plugin which solves this problem!
https://wordpress.org/plugins/wp-nav-menu-extended/
This plugin extends the native wp_nav_menu function and adds additional options:
- level : (integer) (required for this plugin to work) The level of the navigation menu to show. If no child_of parameter is passed, it shows all the items of this level
- child_of : (string|integer) (optional) Either the title or menu item ID of the parent in the menu whose direct children are to be shown
Sample Usage:
$defaults = array( 'theme_location' => 'main_menu', 'level' => 2, 'child_of' => 'About Us', );
wp_nav_menu( $defaults );
Related Posts:
- Display a portion/ branch of the menu tree using wp_nav_menu()
- how to create a menu with all sub categories?
- Display only page specific sub menu items using Custom Walker
- Add a .last class to the last in each ul.sub-menu
- Multi Level Bootstrap Navigation Menu in WordPress
- Add class to top level menu item if it has multiple child levels
- Simple Navigation Walker – Wrapper-class around first sub-menu
- How to get a separate child menu?
- Exclude one item from wp_list_pages( $args );
- How to drag multiple menu items at once in WordPress?
- Customizing the a tag with Semantic UI
- Put a wp_nav_menu inside another one
- How to make pages metabox display all hierarchy in menu admin?
- Generate a Menu that displays all child pages of top level parent
- Check if wp_nav_menu items have submenus
- Automatically Add New Tags to Sub-menu
- Nav walker, bootstrap: Display 3rd level items under 2nd level
- how to only add a top-level admin menu without it creating a sub-level-menu
- how to automatically generate hierarchical menus from hierarchy of pages?
- Programmatically adding menu items function replicates in multiple menus
- Handling complex multi-level architecture / menu for large site
- Sub-Pages only of menu items in current branch using a custom menu
- wp_list_pages: only show subpages on the parent page?
- Menus like a CMS
- How to have custom menu Item CSS Classes for wp_page_menu() or wp_list_pages()
- WordPress sub-menu items suddenly not showing
- How to add a submenu toggle button inside all “li” elements that have a submenu?
- No “current-menu-ancestor” class added when browsing an archive page
- Main Menu and Sub Menu Items for Footer
- How to construct a custom html for submenus
- Check if menu id = $specific_id – then insert specific
- wp_nav_menu() with multiple Class
- How do you manage large menu hierarchies in WP?
- add_submenu_page function to show videos table
- Trying to Create Menu in WordPress
- How do I add recent posts to the menu?
- How to add ID attribute to each submenu?
- Hierarchical menu nesting problem with jQuery targetting
- From a page, is it possible to find entry’s “menu_item_parent”?
- Automatically list top level menu item child pages
- Check if menu_item has children or has parent
- Creating a menu containing categories and authors
- Change submenu markup
- getting the current sub item out of total sub items in a given dropdown (custom walker)
- Show WordPress Menu On External Site
- Switch from hover to click on Twenty Twelve Menu
- a better menu, menu options assistance for WP
- How to highlight 1st level menu item based on actual page
- remove class “sub-menu” from wordpress drop down menu
- Add a submenu to wp_nav_menu
- Insert a div class inside wordpress menu
- Add Labels to Admin Menu ( How To )
- Problem adding ‘has-children’ class to wp_nav_menu
- Automatically Display Sub Menu
- sub menu link is not working
- Add (grand)child pages automatically to nav menu
- Creating menu always gives error A name is required for this term
- Get parents child pages
- How to get submenu of admin menu?
- How to Add support for sub-menu item description in wordpress?
- Add menu headings to WordPress sub menus
- An alternative to WordPress’s built-in menu functionality
- Dropdown primary navigation menu not working
- Is there any way to change the CSS class applied to 2nd level sub menu ul’s?
- Link after WordPress
- cannot get global $menu value in form request
- Show Sub Menu on click and not hover
- Add Different Class on Different Ul in twenty-twentyone theme
- insert an HTML element if there is a submenu only
- How can I creat custom menu with bootstrap
- wp_nav_menu container style args
- Bootstrap Theme Migrated to WordPress
- How can I click the parent menu then redirect to a special URL?
- Add CSS Class to WordPress Menu Item Dependent on the Page the User is Visiting
- Menu walker: how to tell if a sub menu contains submenus?
- Creating navigation out of specific IDs and their children?
- Getting parent object_id of child menu items in WordPress menu
- Generate Submenu based on Parent Page using If Statement
- WordPress menu issue after update
- Product categories are mixed when creating menu
- Displaying a part of a menu containing the page the user is currently viewing and only it’s immediate children
- I can’t correctly display menu
- how to create pages and link them to a menu
- Conditional Nav Menu Inside Nav Menu Across Multisite Sites
- How to separate sub-menu output and keep associated with parent
- Show Child of Parent Page including all other parents
- How to create a menu super voice in WP?
- Menu support for touch devices
- Display all submenus
- Change sub-menu css class
- Adding Sub Menu In a theme which Do not have Menu Options
- ID of parent Menu
- How can I alter the visible menu according to which level I am on [closed]
- How was this menu system created?
- How to display a submenu as a popup when clicking a button?
- how to mage the submenu open on wordpress active page
- Display sub menus as separate lists
- nav tag wrapping around dropdown
- What is the best way to incorporate responsive dropdown navigation menu into custom theme?
- Add acf custom fields so sub item in menus