Problem: I have a custom post type Destinations and a custom taxonomy Destination Types. I have another custom post type Stories that are child posts of Destinations.
On the Destination Type taxonomy archive page, I would like to show:
- A list of Destinations associated with this Destination Type
- A list of the child Stories of these Destinations
Solution:
- Create a WordPress Archive for the Destination Type taxonomy. Set this archive to only display Destination posts.
- In the Loop Output wpv-loop tags of this WordPress Archive, build the design that corresponds to the Destinations list
- Create a new View of Story posts (I will call this View #1), filtered by post relationship, where the post parent is the current post in the loop.
- In the Loop Output editor, you will build the design the corresponds to the Stories list. For now, you can simply insert a wpv-post-title shortcode in the wpv-loop tags to confirm things are working correctly.
- Create a new View of Destination posts, filtered by Destination Type taxonomy, where the taxonomy term is set by the current archive page. I will call this View #2.
- In the Loop Output editor of View #2, insert View #1 in the wpv-loop tags. Now you have nested View 1 inside View 2, resulting in a list of stories about each destination.
- Insert View #2 in the WordPress Archive, outside the wpv-loop tags, but still inside the wpv-items-found shortcode.
Relevant Documentation:
https://toolset.com/documentation/user-guides/create-custom-taxonomies/
https://toolset.com/documentation/user-guides/creating-wordpress-custom-post-archives/
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 3 replies, has 2 voices.
Last updated by 6 years, 6 months ago.
Assisted by: Christian Cox.