Problem: I have a one-to-many relationship set up between two post types. In the child post single page, I would like to display a View of other sibling child posts.
Solution: This feature does not currently exist in Blocks, but in classic Views you can create a Query Filter for post relationship, where the parent post is set by a shortcode attribute "wpvrelatedto". Then you can provide the current post's parent post ID in the View shortcode as shown here:
[wpv-view name="your-child-view-slug" wpvrelatedto="[wpv-post-id item='@relationship-slug.parent']"]
Relevant Documentation: https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/
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 2 replies, has 2 voices.
Last updated by 4 years, 5 months ago.
Assisted by: Christian Cox.