Problem:
How to display conditional data inside views based on child post custom field values
Solution:
We can write custom shortcode to check if a particular post has child post and if that has child post we will get custom field values of child post using "get_post_meta()" function.
Call the shortcode:
[has_children_of_type post_type="aanmelding" ]
Where:
"aanmelding" is your custom post type for which you would like to fetch child post.
Relevant Documentation:
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/
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 |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
This topic contains 16 replies, has 2 voices.
Last updated by mcjS 8 years, 1 month ago.
Assisted by: Minesh.