List subpages even if on a child of a subpage
-
I am trying to get a sidebar navigation list of the 1st level children/subpages of a section, along with the 2nd level children. It’s working on the 1st level child page, but when I click to go to the 2nd level child page, it no longer shows the 1st level children.
Any advice is appreciated!!!
I am using the following code:
<?php if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘List subpages even if on a child of a subpage’ is closed to new replies.