Created
February 16, 2016 01:08
-
-
Save anonymous/4ee9af8d8502871ec061 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() && $query->is_archive()) { | |
$query->set( 'cat', '-64' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment