Created
January 29, 2013 01:47
-
-
Save LinzardMac/4660972 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function order_featured( $query ) { | |
if ( ! is_admin() && $query->is_main_query() ) { | |
$query->set( | |
'orderby' => 'meta_value_num ', | |
'order' => 'ASC', ); | |
} | |
} | |
add_action( 'pre_get_posts', 'order_featured' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment