Reply To: exclude category

Home Forums Lite Version exclude category Reply To: exclude category

#19107
Masonry Guy
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