I assume the dropdown menu "Search by Category" is outputted from Views shortcode [wpv-control], please check the document: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control
There isn't such an option to exclude a specific term from the taxonomy filter, so there isn't such a built-in feature within Views plugin, if you agree, we can take it as a feature request, our developers will evaluate it.
I vote for this feature too! I need a couple of categories to be hidden and I would like to exclude them from parametric search. That would be a very usefull feature!!
Luo is on vacation and this is Minesh here and I'll try to help you further and take care of this ticket. Hope this is OK.
Well - there is no native feature available to exclude a taxonomy term from taxonomy dropdown filter BUT I have a workaround to offer you.
You can use JQuery/javascript to remove the unwanted taxonomy term from your taxonomy select box. Please try to add following code to your view's Filter section JS box:
jQuery(document).ready(function($){
// list of all unwanted category options values as comma separated
var arr = ['sponsors'];
$('.js-wpv-filter-trigger option').each(function() {
if(jQuery.inArray($(this).val() , arr ) != '-1'){
$(this).remove();
}
});
});
I hope above solution will help you to resolve your issue.