Sauter la navigation

[Résolu] How to Only Show Taxonomies Relevant to the Filtered Results

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I have a View that shows a custom post type. There is a custom search filter in that View that shows taxonomy terms. I want to show only the terms that are relevant to the custom post type. Some terms are not used with any posts in this post type, and I want those terms hidden.

Solution: Use the option "Show only available options for each input" as described in the link below.

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

This support ticket is created Il y a 5 années et 9 mois. 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)

Marqué : ,

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par aaronM-9 Il y a 5 années et 9 mois.

Assisté par: Christian Cox.

Auteur
Publications
#1236565

I have a view that displays a list of posts in the custom post type called "Online Resources". I have a drop-down filter on the taxonomy "Categories". How do I make it show only those categories that are actually being used by the posts within the "Online Resources" post type? Right now it shows the complete list of categories even if they aren't used by any of the posts in the data set.

The page can be viewed here and the category drop-down is labeled "Type of Resource": lien caché

Thanks for any help.

- Aaron

#1236664

The most straightforward way to accomplish this is to use the option "Show only available options for each input", as described in the advanced settings for custom search document: https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/

#1236690

My issue is resolved now. Thank you!