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