mgibbs189

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

function exclude_archive_terms( $query ) {
if ( $query->is_archive() ) {
$query->set( ‘tax_query’, array(
array(
‘taxonomy’ => ‘product_cat’,
‘field’ => ‘slug’,
‘terms’ => ‘miscellaneous’,
‘operator’ => ‘NOT IN’
)
) );
}
return $query;
}
add_filter( ‘pre_get_posts’,’exclude_archive_terms’ );

{{/gist}}