WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a three level nav setup using Wordpress menu creator.



I wish to display each level of the navigation alone, in different areas of the page. With current items highlighted.

On pages A, B or C I want to display: A B C
(I can use wp_nav_menu with depth=1 for this)

On pages 1*, 2 or 3 I want to display: A B C and 1 2 3
On pages 1*, Y or Z I want to display: A B C, 1 2 3 and Y Z

Are there any easy ways of displaying the second and third level navs for the currently selected menu item?

The important thing is that I need to be able to display each "level" menu individually.


share|improve this question

You could maybe try getting the list of items and building it out yourself if you really need some more control, without the complexities that the Walker class involves.


share|improve this answer

The easiest way is to override the walk() method in your custom walker when using wp_nav_menu

For a reference, see the code inside the walk() method inside the Walker_Nav_Menu class. That code first separates all top level menu items & puts all the submenu items separately. There you can further separate them out to use different start_el functions or outputting some other random html

share|improve this answer
up vote 0 down vote accepted

What I ended up doing was setting up three sidebars, each using an instance of Advanced Menu Widget and settings as follows:

1. main nav: start at level 0, display 1 level deep, display all items
2. second level nav: start at level 1, display 2 level deep, only show strictly related sub items
3. third level nav: start at level 2, display 3 level deep, only show strictly related sub items

This gives me pretty much the control I needed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.