Remove empty terms from filters
-
I have the same requirement as mentioned here: https://ww.wp.xz.cn/support/topic/remove-empty-terms/ i.e. if you select one filter, and that causes some terms to no longer have items that match, it also shouldn’t be displayed. For example, if I have a category with terms “shirt” and “pants” and another with “red” and “blue”, if I select “pants” and there are no “red” pants, then “red” shouldn’t be displayed either.
That thread is 9 months old and the response was “We will take your wishes into account in the future.” Am I correct that this has not yet been implemented? Is there a workaround?
My use case is that I have a custom post type (resources), with three custom taxonomies (year, topic, type). I have a page with filters for all three taxonomies. Not all resource types have all topics, for example, so if I filter on one type (e.g. public doc) I would like the filter for topics to automatically reset to only show the relevant topics. This doesn’t happen at the moment.
Any suggestions on how to achieve this?
Thanks for the plugin – it is almost perfect!
The topic ‘Remove empty terms from filters’ is closed to new replies.