Skip Navigation

[Résolu] How to automatically assign parent custom post type to posts

This support ticket is created Il y a 7 années et 2 mois. There's a good chance that you are reading advice that it now obsolete.

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.

This topic contains 3 réponses, has 3 voix.

Last updated by susannaD Il y a 7 années et 2 mois.

Assigned support staff: Luo Yang.


I am trying to assign a parent post to multiple child posts.

I have a parent custom post type and child custom post type set up. If I individually click on a child post I can scroll down and select which parent post it belongs to (as per your instructions that I have read about creating post type relationships), but I need to do this in bulk.

Is there a way to select multiple child posts and assign them all to the one parent post at once?


Luo Yang

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

This is not possible within Types, you will need set it's parent post in individual child post.
And Types is using a custom field "_wpcf_belongs_[parent-slug]_id" to store the parent post ID, for example the parent post type is using slug "parent-cpt", then custom field slug is "_wpcf_belongs_parent-cpt_id", you can try assign multiple posts parent post by wordpress function:

More help:


Thanks I have a work around.


Please share the workaround, adding posts to the relationship one at a time is beyond tedious