Home › Forums › Lite Version › exclude category › Reply To: exclude category
I’ve just realised that the code you gave me has stopped the WP Masonry grids elsewhere on the site aren’t working anymore. All I get is the square loading icon.
When I remove the code from the functions.php file they start working again. Here’s the code I’m using:
//Remove sold category from search
add_filter(‘wmlp_query’, ‘my_custom_query_wmlp’,10,2);
function my_custom_query_wmlp($args, $shortcodeID){
if ($shortcodeID == 2){ // HERE # is shortcode ID
$args[‘tax_query’] = array(array(
‘taxonomy’ => ‘product_cat’,
‘field’ => ‘slug’,
‘terms’ => ‘sold’,
‘operator’ => ‘NOT IN’
));
return $args;
}
}
I need to get this site live tomorrow, so I’d appreciate your help with this asap!!
Also, I didn’t hear back from you regarding the ‘no results’ message when there are no results from the search.
Thanks