Skip Navigation

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

This support ticket is created 5 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.

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
- 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 5 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#1211803

s1

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

#1211849

Minesh
Supporter

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?

#1212147

s1

Yes, it is a (multi)select dropdown.

#1212206

s1

I resolved the issue myself.