How to exclude more than one cat. from home??
-
I know this code to exclude a category from the home page:
function exclude_category($query) {
if ( $query->is_home ) {
$query->set(‘cat’, ‘-5’);
}
return $query;
}add_filter(‘pre_get_posts’, ‘exclude_category’);
But how I can put more categories to be exclude from the home page??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to exclude more than one cat. from home??’ is closed to new replies.