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've got a site with a sidebar of 'sub-navigation' I also need to have those links 'parent page' in the navigation also. So, for example I've got


child 1

child 2

child 3

but the php only gives me

child 1

child 2

child 3

the code is here -

<nav id="sub-navigation">
    <?php wp_nav_menu( array('theme_location' => 'main-navigation', 'container' => '', 'walker' => new Related_Sub_Items_Walker(), 'start_depth' => 1, 'include_parent' => 1, 'strict_sub' => 1, 'only_related' => 1, 'filter' => 0, 'filter_selection' => 0, ) ); ?>

Any help would be greatly appreciated. I need it 'within' the navigation due to how I've currently styled the look of it.

share|improve this question

WordPress does not have the class Related_Sub_Items_Walker. It looks like you're using the plugin Advanced Menu Widget.

Judging by the widget's source, you want to use 0 for the start_depth to include the parent. This is untested.

<nav id="sub-navigation">
    wp_nav_menu( array(
      'theme_location' => 'main-navigation',
       'container' => '',
       'walker' => new Related_Sub_Items_Walker(),
       'start_depth' => 0, // 0-indexed
       'include_parent' => 1,
       'strict_sub' => 1,
       'only_related' => 1,
       'filter' => 0,
       'filter_selection' => 0,
    ) );
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.