Skip Navigation

[Resolved] Auto search in child taxonomies when only the parent taxonomy is checked

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

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by s1 3 years, 8 months ago.

Assigned support staff: Minesh.



An example best makes clear what I want to achieve:

I have post type "company" with custom taxonomy "region".
A region is hierarchical (parent = country, child = city).

Let's say I create a new company "OnTheGo" and for the region-taxonomy I only check the parent-term "United States" and NOT any of the cities below it.

Now, when going to the Search View I only select the city "New York" (which is a "child" of the region "United States").
What I want, in that case, is to see "OnTheGo" in the search results -> this does NOT work.

If however, for company "OnTheGo" I checked any child (city) under "United States" then it should only appear for those cities -> this works.

Maybe the only solution is to save *all* child region term (= cities) automatically if only the parent region term (= country) is selected with some kind of hook.

Hope you can help me. Being struggling with this issue for a while now...



Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - can you confirm that the filter for region taxonomy with your view is added as select drop-down?



Yes, it is a (multi)select dropdown.



I resolved the issue myself.