Home › Toolset Professional Support › [Resolved] Hide specific taxonomy item from dropdown in search filters
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Tagged: Custom search, Views, Views plugin
Related documentation:
This topic contains 2 replies, has 2 voices.
Last updated by Alexanndre Levan 6 years, 2 months ago.
I have a custom view with search filters that display the taxonomy/categories in a dropdown: hidden link
The issue is that I need to remove one specific option from the dropdown. I am not sure how to achieve this.
This is unfortunately not possible in Taxonomies.
In Custom Fields, you can add manual options in this case.
If you edit the View, you can add this in the "Search and Pagination" editor you can insert the Taxonomy filter.
There, you will choose "Use manually entered values" and enter matching values/labels.
That means, currently we can:
- file a request to make it possible for taxonomies as well
- the current solution would be to use a Field instead.
I used the following JS script to manually hide the specific item from the dropdown instead.
<script> jQuery(function($){ var arr=['name-of-slug-to-hide']; $('select[name="wpv-category"] option').each(function(){ if(jQuery.inArray($(this).val(), arr)>=0){ $(this).hide(); } }); }) </script>