Display Parent, and Sub Pages.
-
https://usshyphron.com/cmsdev/deys/?page_id=25
It displays the subpages of the current parent page, but there are two issues. When you go deeper into a 3rd level page it loses the list of pages. I’d also like it to display the top level parent page at the top of the list.
This is the code I’m using currently.
<?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) { ?> <li class="sub-nav"> <ul><?php echo $children; ?></ul> </li> <?php } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Display Parent, and Sub Pages.’ is closed to new replies.