Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

reverse-post-order.php

By: jan_dembowski on Jan 21st, 2012  |  syntax: None  |  size: 0.24 KB  |  views: 136  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /*
  3. Plugin Name: Reverse the query to ascending order
  4. */
  5.  
  6. add_action( 'wp_head' , 'mh_reverse_query' );
  7. function mh_reverse_query() {
  8. global $query_string;
  9.    if ( is_home() ) {
  10.       query_posts($query_string . "&order=ASC");
  11.    }
  12. }