Skip Navigation

[Closed] It would be nice to have types_parent_post() as well as types_child_posts()

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 11 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

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
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Caridad 11 years, 9 months ago.

Assisted by: Caridad.

Author
Posts
#16930

Wordpress doesn't let you create hierarchies of different custom post types. Types doesn't let you access the parent of a custom post. It would be great if we could do that.

#16969

Dear Bennett,

You can access the parent id of a post with:

<?php
$parent_id = wpcf_pr_post_get_belongs(get_the_ID(), 'parent-type-slug');
if (!empty($parent_id)) {
$parent = get_post($parent_id);
var_dump($parent);
}
?>

Please let me know if there is anything else that I can assist you with.

Regards.
Caridad

The topic ‘[Closed] It would be nice to have types_parent_post() as well as types_child_posts()’ is closed to new replies.