Support » Fixing WordPress » wp_list_pages list all but top-level parent page

  • I am currently using this code, which is what I want, except that if I am on a grandchild page, it only displays the other grandchildren. I would like to display all the grandchildren and children of a single parent, without displaying the single parent. How can I do that?

      $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
      $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
      if ($children) { ?>
      <?php echo $children; ?>
      <?php } ?>
  • The topic ‘wp_list_pages list all but top-level parent page’ is closed to new replies.