Problem:
The issue here is that the customer had stored some id in a custom field of another CPT but wanted to know if its possible to use Views to filter on his secondary view to show his Post Parent essentially.
Solution:
In this scenario we will be using Products and Beans where products has the custom field that stores the ID of the beans.
So essentially when you're on the bean's page you want to display the products?
In this case you will need to create a view for the product cpt and then add a filter for the custom field that has the bean id in it.
Then set that field so that the value is retrieved using a shortcode attribute. Next all you need to do is to add the view to the bean page and then pass the ID of the page into the view like this.
[wpv-view name='my-view' my_value='[wpv-post-id]']
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 |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 11 months ago.
Assisted by: Shane.