Hi,
Thank you for contacting us and I'd be happy to assist.
I'm afraid, there is no direct method available for this filtering, so it will require some workaround.
1. First, you'll create a taxonomy view that will list all these "Medium" taxonomy terms that you're using for filtering.
2. In the "Loop Editor" section of this view, you'll build the output in such a way that:
a). A conditional wrap exists that shows only those terms, where the custom term field value is 1.
( for this example, I'm using a field with slug "allowed", but you'll need to replace it with the one used on your website )
b). For the terms which are allowed to show through the conditional checks, you'll show their term slugs within a custom CSS block, so that in the main view's category filter drop-down options with those specific term slug as values, are visible.
Example of the complete content in the "Loop Editor" section:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-conditional if="( '[types termmeta='allowed' output='raw'][/types]' eq 1 )"]
<style> .wpv-filter-form select[name='wpv-medium'] option[value='[wpv-taxonomy-slug]'] { display: block; } </style>
[/wpv-conditional]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[/wpv-no-items-found]
[wpv-layout-end]
3. To ensure minimal output from this new taxonomy view, please also check the "Disable the wrapping DIV around the View" option, just above the "Output Editor" section.
4. Now, getting back to the edit screen of the original search view, you'll include some custom CSS code in the CSS editor, that will hide all the options except for the first default option from the category select drop-down filter:
.wpv-filter-form select[name='wpv-medium'] option {
display: none;
}
.wpv-filter-form select[name='wpv-medium'] option[value='0'] {
display: block;
}
5. The last step would be to include the newly created taxonomy view's shortcode at the start of the "Output Editor" section of the original search view:
[wpv-view name="view-to-show-list-of-terms"]
Note: Please replace "view-to-show-list-of-terms" with your actual taxonomy view's name/slug.
The end result will be that the custom CSS code from the main search view will first hide all the term options from the category select drop-down filter. But then the custom CSS code from the taxonomy view will show options for all those terms where the allowed field is checked (i.e. has value 1).
I hope this helps and please let me know if any point or step is not clear.
regards,
Waqar