Sidebar Children
-
Someone gave me a php script that shows all the child pages of whatever page the script was put in. It looks like this:
<?php if(wp_list_pages(“child_of=”.$post->ID.”&echo=0″)) { ?>
<div id=”childpagelist”>-
<?php wp_list_pages(“title_li=&child_of=”.$post->ID.”&sort_column=menu_order”);?>
</div>
<?php } ?>The problem I am having is that the sidebar is listing the child pages fine, but it is listing the child pages of the child pages, so it looks like this:
Child 1
Child 2
Child of Child 2
Child 3How do I make it list only the child pages of the parent page? I want it to look like this:
Child 1
Child 2
Child 3Thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Sidebar Children’ is closed to new replies.