Skip Navigation

[Fermé] View that filters Taxonomy Parent Terms/Child Terms

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.

Marqué : 

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

Last updated by Matthew Il y a 9 années et 6 mois.

Assigned support staff: bruce.

Auteur
Publications
#7839

I have a custom taxonomy with name "Regions". It includes parent and child regions, i.e.:

Parent Region A
-Child Region A-1
-Child Region A-2
-Child Region A-3

Parent Region B
-Child Region B-1
-Child Region B-2
-Child Region B-3

I want to create views that will display posts according to the hierarchy of the Region taxonomy. i.e.:

Parent View:
filter a: Selects taxonomy of type "Region"
filter b: selects "Parent Region" taxonomy term

Child View:
filter: selects "Child Region" taxonomy term, based on parent view

Grand-Child View:
Select posts with "Child Regions", based on parent view

Not sure if this is possible/makes sense. In practical terms, I want a dynamic list output on the front end that looks like this:

Parent Region A Title
- Child Region A-1 Title
- - Post 1
- - Post 2
- - Post 3
- - etc

Parent Region B Title
- Child Region B-1 Title
- - Post 1
- - Post 2
- - Post 3
- - etc

Any ideas?

#7841

bruce
Supporter

Languages: Anglais (English )

Timezone: Australia/Perth (GMT+08:00)

Hi Matthew,

You need to create 3 views for this.

The first View will select taxonomy that has a Parent of None. This will select the top parent.
The second View will select taxonomy that has a Parent set by the Parent View.
The third View will select Posts that have a Taxonomy set by the Parent View.

Similar to what we have here - https://toolset.com/learn/wordpress-classifieds-site/ - but you'll need to add the Post view.

Best regards,
Bruce

#7857

Perfect. Thanks Bruce.

Le sujet ‘[Fermé] View that filters Taxonomy Parent Terms/Child Terms’ est fermé à de nouvelles réponses.