Nav Walker that shows only children and siblings of top level parent menu item
I have a nav menu that is structured like this..
Main Section 1
– Child Link 1
-- Grandchild Link 1
– Child Link 2
– Child Link 3
Main Section 2
– Child Link 1
– Child Link 2
– Child Link 3
Lets say that I am on any page within Main Section 1 (including Main Section 1 itself). I want to only show the menu items (and their children) that have Main Section 1 as their parent. So in this scenario the menu items that would be output by wp_nav_menu
would be...
Child Link 1
- Grandchild Link 1
Child Link 2
Child Link 3