Created
March 19, 2013 17:40
-
-
Save braddalton/5198288 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', 'exclude_category_posts_home' ); | |
function exclude_category_posts_home( $query ) { | |
if( $query->is_main_query() && $query->is_home() ) { | |
$query->set( 'cat', '-32' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment