PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Untitled
8 sec ago
Untitled
12 sec ago
Untitled
16 sec ago
Untitled
18 sec ago
Untitled
23 sec ago
Untitled
28 sec ago
Paste Title
HTML | 24 sec ago
Untitled
26 sec ago
reverse-post-order.php
By:
jan_dembowski
on
Jan 21st, 2012
| syntax:
None
| size: 0.24 KB | hits: 113 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
<?php
/*
Plugin Name: Reverse the query to ascending order
*/
add_action( 'wp_head' , 'mh_reverse_query' );
function mh_reverse_query() {
global $query_string;
if ( is_home() ) {
query_posts($query_string . "&order=ASC");
}
}
create a
new version
of this paste
RAW Paste Data
<?php /* Plugin Name: Reverse the query to ascending order */ add_action( 'wp_head' , 'mh_reverse_query' ); function mh_reverse_query() { global $query_string; if ( is_home() ) { query_posts($query_string . "&order=ASC"); } }