Ready to get started?Download WordPress


Limit number of child pages listed (4 posts)

  1. jami1955
    Posted 4 years ago #

    I need to limit the number of child pages listed, the call creating the list is:
    <?php wp_list_pages('child_of=868&sort_column=post_title&title_li=') ?>
    I tried this:
    <?php wp_list_pages('child_of=868&number=3&sort_column=post_title&title_li=') ?>
    but the entire list disappeared, so can anyone tell me how to write the parameter limiting the list to a certain number?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

  3. jami1955
    Posted 4 years ago #

    The link you've given I've read. In particular the part about limiting the number of pages, or specifying the number of pages does not work. There is a note there on that page saying it does not work. Here's the note as it appears there:

    (integer) Sets the number of Pages to display. This causes the SQL LIMIT value to be defined. Default to no LIMIT. (This parameter was added with Version 2.8) NOTE: this is currently not working, see http://core.trac.wordpress.org/ticket/10745

    So, I'm wondering if anyone found a way to get it to work. Doesn't look like it....


  4. esmi
    Forum Moderator
    Posted 4 years ago #

    I think your only other option is to build your own page list using get_pages.

Topic Closed

This topic has been closed to new replies.

About this Topic