Skip Navigation

[Resolved] Hiding empty taxonomy terms in search filters

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to hide any search filter options that are irrelevant or empty.

Solution: You can use the Views feature "Limit Filter Inputs According to Available Results". This feature can hide any options that would produce no results in the View.

Relevant Documentation:
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by doronN-2 6 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1127044

I have Organisation as CPT. It has custom taxonomies: Org type, Service type, Target Audience, Ares of operation. I have an archive page with a search drop-down for filtering Organisations by different taxonomies. You can see it here

hidden link

Some taxonomies terms are empty - i.e no Organisation is associated with them. I want to hide empty taxonomies from the dropdown (without deleting them in the backend). How Do I do that?

Thanks!

#1127071

Hi, you can use the Views feature "Limit Filter Inputs According to Available Results". This feature can hide any options that would produce no results in the View. We have information about that available here: https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/

Let me know if I've misunderstood your request.

#1129591

My issue is resolved now. Thank you!