Custom Nav walker display current menu item children

Posted by Prem Tiwari | Updated on

This is the walker I used to display only children of the current menu item. Or the menu items siblings if it doesn’t have any children of its own.

There are comments throughout the class explaining each section

Attach it like you would with any other custom walker on a wp_nav_menu


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers