Skip Navigation

[Résolu] Parametric search filters

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

Problem: I would like to show all options for each taxonomy filter in a custom search View, but options without any posts assigned are not appearing. I would also like to display separate filters for each level of hierarchy in a taxonomy.

Solution: In the View editor screen, find the Custom Search Settings panel. If you cannot see it, activate it in the Screen Options tab. Then select "Let me choose individual settings manually" and "Always show all values for inputs."

It is not currently possible to split a taxonomy filter up into separate inputs per hierarchical level. You could create separate taxonomies, or separate post types with post relationships.

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 3 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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é : ,

This topic contains 2 réponses, has 2 voix.

Last updated by Jo4nny8 Il y a 5 années et 3 mois.

Assisted by: Christian Cox.

Auteur
Publications
#1182831

Hi all,

I have 2 questions I need help with if possible.

I have a post type archive (jobs) and each post is assigned a taxonomy of (location)

In the archive view, I want to be able to filter jobs by the location. This works great, except it only shows filter options for locations that have posts assigned. I want to show all locations to be selectable and then show a ‘no posts found’ message if the taxonomy is empty? In essence I’m wanting to slightly alter the select dropdown to show empty taxonomies?

Secondly, there are a lot of locations and they’re ordered hierarchically state->city->town.

Is it possible to have 1 select box showing states, then upon selecting a state, another ‘appears’ to select the city, then the town etc?

#1183130

This works great, except it only shows filter options for locations that have posts assigned.
Please edit this WordPress Archive in wp-admin. Scroll up in the top right corner and click "Screen Options" and make sure "Custom Search Settings" is turned on. Then scroll down to the Custom Search Settings panel and select "Let me choose individual settings manually". Select "Always show all values for inputs" to display all terms in the filter options.

Is it possible to have 1 select box showing states, then upon selecting a state, another ‘appears’ to select the city, then the town etc?
It's not possible to split a single taxonomy up by hierarchy into separate filters like this. Instead, you could use 3 different taxonomies and create separate filters for each one, or you could use 3 different post types (States, Cities, Towns) with post relationships between them.

#1183540

Thank you, I was able to edit the fields using the info provided.

I opted for a slightly different approach in the end though using a series of conditional shortcakes to allow users to select parent -> child taxonomies directly rather than the way I was going it. Ill keep the above for future reference though 🙂

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.