WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After I complete a collection of posts, can I reorder them in reverse to read from the top (oldest post) to bottom (newest post)?

share|improve this question

You can reverse the order of the main query via the pre_get_posts action:

function wpa85668_ascending_order( $query ) {
    if ( $query->is_home() && $query->is_main_query() )
        $query->set( 'order', 'ASC' );
add_action( 'pre_get_posts', 'wpa85668_ascending_order' );

If it's a custom query, just set the order query var to ASC in the arguments passed to the query.

share|improve this answer
Thanks for answering a newbie-researched question. I'll try your suggestion. – user27384 Feb 13 '13 at 20:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.