listing child pages
-
I’m using a static home page and have another page for displaying the list of blog posts. I also have some static pages as subpages of the main blog page.
I’ve used the 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 } ?>
in the sidebar file to display a list of sub pages. It’s working fine on every single page in the site, except on the blog page. Nothing shows up at all. So i can’t then get to the sub pages of the blog.
What have I done wrong?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘listing child pages’ is closed to new replies.