Shane at support kindly helped me out with the code below, this so only certain taxonomies display in a drop down.
Is there a way to do the opposite, by that I mean if we add just one or two taxonomies they will 'not' display in drop down?
The reason, we have a location taxonomies and this has about 30, we wish to exclude 2 in the drop down.
As we often add to this, it would be far easiest to add the two we didn't wish to display.
Instead of populating the $args with an array of slugs you want to include, you can instead provide an array of terms to exclude, but the exclude argument requires term IDs rather than term slugs, so you'll need to look those up. (If you go to the list of terms you can see the IDs when hovering over the edit links.)
So your code would then look something like this:
add_filter( 'wpv_filter_taxonomy_frontend_search_get_terms_args', 'ts_mod_tax_filter', 10, 3 );
function ts_mod_tax_filter( $args, $tax, $view_id ){
if ( $view_id == '37131' && $tax = 'property-feature' ){
$args['exclude'] = array( 1, 2, 3 ); // Edit array of term IDs to exclude
}
return $args;
}