How To Display Your Oldest Post First

02.05.10 by Jerome in Tutorials

How To Display Your Oldest Post First

If one of your development project is the need to list your oldest blog post first, simply add this code below:
In your template files: index, single, whichever one you want to apply this to.

Find this line

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

And simply add this code above it:

Ascending order, lowest to highest value

<?php query_posts('order=asc'); ?>

or

Descending order, highest to lowest value

<?php query_posts('order=desc'); ?>

No related posts.

Get More Wordpress Tips & Tricks

Liked this post? subscribe to our email updates or RSS feed!

blog comments powered by Disqus