Here is my 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 } ?>
This outputs children and grandchildren links. I want to only display the direct children for a particular page, which I will wrap in a conditional. So what I need to do is tell it not to display the grandchildren. I hope this makes sense.
Anyone have the expertise to figure this out? I've had trouble searching for this online.
Thanks!