Created
May 31, 2012 20:37
-
-
Save jaredatch/2846060 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
/** | |
* Tweak the query | |
*/ | |
function ja_query_tweaks( $query ) { | |
if( $query->is_post_type_archive( 'program-partners' ) ) { | |
$query->query_vars['orderby'] = 'title'; | |
$query->query_vars['order'] = 'ASC'; // Can be ASC or DESC | |
// $query->query_vars['posts_per_page'] = -1; uncomment to show ALL on first page | |
return; | |
} | |
} | |
add_action( 'pre_get_posts', 'ja_query_tweaks' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment