Grow your CSS skills. Land your dream job.

NO grandchildren

  • # September 9, 2009 at 9:25 pm

    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…

    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) { ?>

    < ?php
    $parent_title = get_the_title($post->post_parent);
    echo $parent_title;
    ?>

      < ?php echo $children; ?>

    Please help…
    Thank you so much.

    Ok I tried this:

    Code:
    $children = wp_list_pages(“depth=1&title_li=&child_of=”.$post->post_parent.”&echo=0″);
    else
    $children = wp_list_pages(“depth=1&title_li=&child_of=”.$post->ID.”&echo=0″);

    …. no go. :(

    Any other ideas as to WHERE I should put this?

    # September 13, 2009 at 7:51 pm

    Anyone?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".