WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] List Subpages In Order By Creation Date (2 posts)

  1. chanel
    Member
    Posted 5 years ago #

    In essence of my previous topic in reference to this, I thought I got this up and running but unfortunately I didn't.

    I need for my subpages for
    this page
    to be listed in order by the date it was created.

    Right now it looks like this:

    * abortion. 03/08/09 (7 comments)
    * domestic violence. 02/28/09 (5 comments)
    * online infidelity. 03/17/09 (0 comments)

    But I need it to be like this:

    * online infidelity. 03/17/09 (0 comments)
    * abortion. 03/08/09 (7 comments)
    * domestic violence. 02/28/09 (5 comments)

    Here is the php code I used:

    <div class="entrytext">
    <?php $children = get_pages('child_of='.$post->ID.'&show_date=modified
    &date_format=$date_format');if ($children) : ?>

    <?php endif; ?>
    </div>

    </div>

  2. MichaelH
    Member
    Posted 5 years ago #

    According to the Codex article, Function_Reference/get_pages, the argument, sort_column=post_modified, just might be the ticket.

Topic Closed

This topic has been closed to new replies.

About this Topic