Last active
December 19, 2015 15:09
-
-
Save pfefferle/5974102 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 | |
/* | |
Plugin Name: Exclude Cat 24 | |
Plugin URI: https://gist.github.com/pfefferle/5974102 | |
Description: Exclude Cat 24 | |
Author: pfefferle | |
Author URI: http://notizblog.org/ | |
Version: 1.0.0-dev | |
*/ | |
function ekaabo_exclude_cat( $query ) { | |
if ( $query->is_main_query() ) { | |
$query->set( 'cat', '-23' ); | |
} | |
} | |
add_action( 'pre_get_posts', 'ekaabo_exclude_cat' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment