• I want to list my child page links underneath the content of my parent page. This code does work but for some reason, it is also displays my home page link. Why would it do that and what can I do to remove it?

    <?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 class="subpages">
      <?php echo $children; ?>
      </ul>
      <?php } ?>
  • The topic ‘parent and child page links’ is closed to new replies.