Problem: I created two CPTs: Events and Profiles. I have a View of Events displayed in the template for Profile posts, and I would like to only display Events where the title of the current Post can be found in the "notes" WYSIWYG field on the Event post.
Solution: Configure the notes custom field Query Filter to use a shortcode attribute and pass the current Profile post title into that shortcode attribute like so:
[wpv-view name="your-events-view" search="[wpv-post-title]"]
This technique is called passing arguments to views, and allows you to create Views with dynamic Query Filters.
Relevant Documentation:
https://toolset.com/course-lesson/passing-arguments-to-views/
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-title
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 3 years, 7 months ago.
Assisted by: Christian Cox.