Support » Fixing WordPress » Limit children of Page in list

  • …searched and searched, can’t find it. I have a Page, and am listing the children of that page. This list will get too long eventually. I need to call only the latest 15 children of the parent. Right now I have:

      $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 } ?>

    which is listing the pages nicely, but in some time, that list is going to get too long. Any way to limit it to the latest 15?


  • The topic ‘Limit children of Page in list’ is closed to new replies.