WordPress.org

Ready to get started?Download WordPress

Forums

Limit number of child pages listed (4 posts)

  1. jami1955
    Member
    Posted 3 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?
    thanks
    JSC

  2. esmi
    Forum Moderator
    Posted 3 years ago #

  3. jami1955
    Member
    Posted 3 years ago #

    @esmi
    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:

    number
    (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....

    thanks,
    JSC

  4. esmi
    Forum Moderator
    Posted 3 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