• I’m using this code to display subpages when viewing the parent page:

    <?php if(wp_list_pages("child_of=".$post->ID."&echo=0")) { ?>
    <ul>
    <?php wp_list_pages("title_li=&child_of=".$post->ID."&sort_column=menu_order&show_date=modified&date_format=$date_format");?>
    </ul>
    <?php } ?>

    When I get into a child page though, I still want all related children pages to still be listed. Right now the names disappear because there are no children pages of the one I’m viewing.

    Any suggestions?

Viewing 3 replies - 16 through 18 (of 18 total)
  • Kafka is GOD!

    Thanks a lot for the code at “Feel free to play with it:”

    YOU made my day!!!

    I am very happy with this thread. I manage with this code and the fold_page plugin and some others things to display the parent pages in the header of my website. Selecting the parent with children, I get the list of children in the sidebar, selecting one of the children, the parent is still in active mode in the topnavigation, by showing another color. So far perfect. but now the owner of the site wants grandchildren, subpages of the subpages. Now I get the following problem. Everything is okay till I select a grandchild in the sidebar. Then the grandchild becomes child and his parent becomes parent instead of staying the child. In the main navigation, the parent is no longer selected and in the sidebar are only two levels instead of three.
    So normally you have:
    parent
    – child
    – child2
    — grandchild1
    — grandchild2

    and the parent is also selected in the topnavigation

    Clicking on grandchild1 gives:
    child
    – grandchild1
    – grandchild2

    parent is no longer selected in the topnavigation

    What can i do to show the first list in the side bar when selecting a grandchild and also let the parent in the main navigation stay active.

    In the sidebar I have used the code given above.
    The parent stays selected by the following code in the css:
    #navbar .current_page_item a, #navbar .current_page_item a:visited, #navbar .current_page_parent a, #navbar .current_page_parent a:visited{etc etc

    Hope there is someone who can help me with this.

    Karin

    I love you.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Displaying Children When Viewing 1 Child’ is closed to new replies.