Forked from anonymous/gist:4ee9af8d8502871ec061
Last active
February 16, 2016 14:40
-
-
Save billerickson/a045230e5f926e29b3e1 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
add_action( 'pre_get_posts', 'test_per_dic' ); | |
/** | |
* Exclude Category from Blog | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/customize-the-wordpress-query/ | |
* @param object $query data | |
* | |
*/ | |
function test_per_dic( $query ) { | |
if( $query->is_main_query() && ! is_admin() && $query->is_category( 64 )) { | |
$query->set( 'orderby', 'title' ); | |
$query->set( 'order', 'ASC' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment