Problem:
How do I call the Parent Post of a Child Post with PHP?
Solution:
You can use the Types API:
https://toolset.com/documentation/user-guides/many-to-many-post-relationship/ > Displaying Many-to-Many Relationship Using Types PHP API
You can also access the Parent Post ID of a given Post with WordPress API:
$parent_post_id = get_post_meta($post_id, 'wpcf_belongs_parent-post-type-slug_id', true);
Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 4 replies, has 2 voices.
Last updated by kennethW 8 years ago.
Assisted by: Beda.
The forum ‘Types Community Support’ is closed to new topics and replies.