Problem: I have a one-to-many post relationship set up between two post types. On the parent post, I would like to display a View of child posts. On the child post, I would like to display a View of sibling posts.
Solution: On the parent post template, insert a View of the child post type. Add a Query Filter for post relationship, set by the post where the View is shown. In the child post type template, insert a View of the child post type. Add a post relationship Query Filter set by a shortcode attribute "wpvrelatedto". In the View shortcode, pass in the current post's parent post ID using the following format:
[wpv-view name="Your Child View Number 2" wpvrelatedto="[wpv-post-id item='@relationship-slug.parent']"]
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 |
---|---|---|---|---|---|---|
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 4 replies, has 2 voices.
Last updated by Rafael Corts 3 years, 8 months ago.
Assisted by: Christian Cox.