WordPress.org

Ready to get started?Download WordPress

Forums

Oldest to newest... (5 posts)

  1. michaelyork29
    Member
    Posted 6 years ago #

    Hello all,

    Is there a way to make wordpress display posts oldest to newest instead of the other way around?

    Thanks,
    Michael

  2. Keilya
    Member
    Posted 6 years ago #

    Yesh. Check out Custom Query String: http://wordpress.org/support/topic/141120

  3. adam-s
    Member
    Posted 6 years ago #

    Add...

    query_posts($query_string . "&order=ASC");

    ..within the PHP tags and before the loop.

    This would need to be done on index.php and for any files pertaining to archives or categories as well.

  4. jsherk
    Member
    Posted 6 years ago #

    Thanks adam-s

    Using WP2.5, in the Main Index Template of my theme, I added these lines:
    <!-- This reverses the order of post display from Oldest to Newest for things like events -->
    <?php query_posts($query_string . "&order=ASC"); ?>

    just before the this line:
    <!--the loop-->

    and it reversed the order!

    I also installed the plugin 'the future is now' which allows future dated posts to be displayed:
    http://wordpress.org/extend/plugins/the-future-is-now/#post-2682

    So now I can date my events with their actual date, and they will show up in the order they should (from most current to the farthest away).

    Any plugins out there that can be used to auto-delete (or auto-unpublish) a post on specific date, so I don't have to manually remember to go and remove it once the event has passed?

    Thanks

  5. krichter
    Member
    Posted 5 years ago #

    This is great! Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.