Navigation – 3rd level

  • Unknown's avatar

    Hey

    I’ve got my sub-navigation set up all follows:

    <?php if($post->post_parent)
    $children = wp_list_pages(“title_li=&depth=1&child_of=”.$post->post_parent.”&echo=0″); else
    $children = wp_list_pages(“title_li=&depth=1&child_of=”.$post->ID.”&echo=0″);
    if ($children) { ?>

      <?php echo $children; ?>

    <?php } ?>

    Which is fine – if I’m on a first or second level page it displays the sub menu showing the second level pages.

    However when I switch to a third level page the menu changes to display only the third level pages. How can I tweak it so it still only shows the second level pages as before?

    Basically I want my navigation to display the second level pages ONLY all the time, even if you go to a third/fourth level page.

    Thanks

  • Unknown's avatar

    You did not specify a blog address or reason for posting when you created this topic.

    This support forum is for WordPress.com hosted blogs only. If you have a self-hosted WordPress blog you need to seek help at the WordPress.org forums, not here.

    If you don’t understand the difference, you may find this information helpful.

  • The topic ‘Navigation – 3rd level’ is closed to new replies.