Offset list_pages depth - or an alternative solution (1 post)

  1. Darfuria
    Posted 7 years ago #

    I'm working on a website at the moment, and the navigation works as follows (by client specification).

    Underneath the header there is a horizontal navigation listing the top level pages, clicking on one of these takes you to page.php, which has a vertical navigation in the sidebar listing the sub-pages of that particular page like this:

    2nd level
    - 3rd level
    - 3rd level
    - 3rd level
    2nd level
    - 3rd level
    - 3rd level
    - 3rd level

    and so on, and so on.

    This is the code I am currently using in the vertical navigation:

    $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
    if ($children)
    		echo $children;

    What I would like to be able to do is continue to have the same vertical navigation, regardless of the current page level. I'm finding it hard to list the sub-pages of a 1st level page when you're on a 3rd level page.

    Any suggestions greatly appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic