Hi: I would like to create a nested taxonomy with dropdowns. I'm wondering if it's possible to connect the separate taxonomies, e.g.
Car Year (select the year, then, in a dropdown, it shows
Car Make (select the make, then, in a dropdown, it shows
Car Model (select the model, then, in a dropdown, it shows
Car Color (select the color in a dropdown, then hit "GO".
Is this possible? In this toolset entry from 2013
https://toolset.com/forums/topic/nested-taxonomies/
it seems what I'm looking to do "It has been requested several times and I will forward your request to the developers to see if it will be implemented." Was it ever added/implemented as a feature, or can you do this only with CPTs that are related in parent-child or 1-to-many? I have too many taxonomy children in each parent taxonomy to make it feasible to do put all the info into one taxonomy.
Also, whichever method I need to use to create this (if not taxonomy, then CPTs in relationship), does the database get hit every time there's a selection made?
Thank you.
Hello,
I assume we are talking about Views custom search form.
If it is, then it is possible with separate taxonomies, you just need to enable the option "Show only available options for each input", see our document:
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/
Select Show only available options for each input and Views will automatically limit the options of each filter input, when visitors select other inputs.
I am asking whether *taxonomies* can be used. The link you provided shows the real estate reference site. In that example, I am looking to do something similar with the way the State and City are set up--eg pick a State, then only Cities for that State are filtered and shown. But I see that it uses CPTs that are linked viz post relationship.
Can I do the same with *taxonomies* or do I need to use CPTs only.
Yes, as I mentioned above, it is possible with multiple separated taxonomies, you just need to enable the option "Show only available options for each input".
See below test site:
hidden link
Here is the demo view:
hidden link
user/pass: xgren/111111
It is based on multiple separated taxonomies:
hidden link
Taxonomies:
- Car Years
- Car Models
- Car Makes
Hi: Thank you, I misunderstood.
--Did you create post relationships between the taxonomies, or was it just the "Show only available options for each input"? (I can't figure out how to find it in the demo site that you gave a link to.)
Thank you.
Q) Did you create post relationships between the taxonomies
All taxonomies are registered to same post type "Car"
hidden link
as I mentioned above, you just need to enable the option "Show only available options for each input"
hidden link
Thank you, that is very helpful.
Can one only use 3 levels (parent/child/grandchild), or can it go deeper?
Yes, it can go deeper, you can add more filters, as you can see the demo is based on custom taxonomies.
And you can also try with 3 levels (parent/child/grandchild) post type relationships, it is possible too.