• I have been trying to figure a way to do this for the last month. I have researced anything and everything and nothing seems to work. I found this snipet of code that come close to what i am looking for but is missing one thing.

    I am trying to list the Child of the parent. If there is no child list the parents level.

    So this code list the Child of the parent. But if the parent doesn’t have a child it shows nothing. Any help would be great.

    <?php
    $children = wp_list_pages(‘title_li=&child_of=’.$post->ID.’&echo=0&depth=1′);
    if ($children) { ?>
    <h4>Additional Resources</h4>

      <?php echo $children; ?>

    <?php } ?>

  • The topic ‘Subnav List Child of Parent if statement’ is closed to new replies.