FacetWP – exclude term from blog home

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

function home_exclude_term( $query ) {
if ( $query->is_home() ) {
$query->set( ‘tax_query’, array(
array(
‘taxonomy’ => ‘category’,
‘field’ => ‘slug’,
‘terms’ => ‘blog’,
‘operator’ => ‘NOT IN’
)
) );
}
return $query;
}
add_filter( ‘pre_get_posts’, ‘home_exclude_term’ );

{{/gist}}