Home › Forums › Lite Version › exclude category › Reply To: exclude category
November 3, 2017 at 6:01 pm #19107
Keymaster
Hi Lee,
Can you please try this ?
//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;
}
Regarding the no result. We don’t have that currently. We forget to add that and no client ask for that yet. We will try to add in next release.
Thanks