Skip Navigation

[Resolved] How to limit the taxanomy select field?

This support ticket is created 3 years, 3 months 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.

Our next available supporter will start replying to tickets in about 1.32 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 3 voices.

Last updated by simonV-3 3 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2128471

Tell us what you are trying to do? On this page: hidden link I have a select field for the Taxonomy (Region, Destination, Locations). Now I like to limit, that it's showing only from a main category and it's sub-categories.

So instead of all categories, it should show only Thailand and the sub-categories

Is there any documentation that you are following? https://toolset.com/documentation/user-guides/views/filtering-views-by-taxonomy/

Is there a similar example that we can see? hidden link

What is the link to your site? hidden link

#2128663

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, can you clarify what you are aiming to do?

You have a custom taxonomy for the location (where the top level is region), and you have multiple top-level regions, one of which is Thailand.

You have a search View with a filter for this taxonomy, and you want to limit it so that it excludes all top-level terms except for Thailand.

Have I understood you correctly?

#2128715

Dear Nigel

If I have a predefined taxonomy filter in the view, i can't have and use a select field afterwards with the sub-levels.
This I would like to have, if possible.

If I don't use a filter, then I can have a select field in the search form, but there I have all taxonomies in - depending on the url parameter, predefined the taxonomy. But the other taxonomies I will still see.

Regards,

Simon

#2129399

Hi Simon,

Thank you for sharing these details.

For the multi-level search filters that you're planning to use, I'm afraid, a single taxonomy with heirarichal terms won't work.

To achieve this, you can create a new post type for each level (i.e. Regions, Destinations and Locations) and then join them through one-to-many post relationships, so that:

1. One Region can have many Destinations
2. One Destination can have many Locations
3. One Location can have many Listings.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2133299

My issue is resolved now. Thank you!