• Resolved hoss9009

    (@hoss9009)


    So I DO NOT want to show grandchildren. I know how to do this with the normal WP codex, but I’m not using in a normal way.

    Here’s what I’m doing…

    <?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) { ?>
                        <div class="summer_side">
                        <h3 class="child-nav">
    <?php
    $parent_title = get_the_title($post->post_parent);
    echo $parent_title;
    ?>
                        </h3>
                        <ul>
                        <?php echo $children; ?>
                        </ul>

    Please help…
    Thank you so much.

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘NO grandchildren’ is closed to new replies.