Skip Navigation

[Résolu] how to establish a relationship afterwards

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 2 voix.

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

Assigned support staff: Joanna.

Auteur
Publications
#331597

I have 2 custom post types: Organization and Member. Organization is a parent of Member. I import all organizations from a XML file and also for all members. Organization has an unique ID (3119) and Member has a field pointing to that ID.

After the import, both CPT are not yet related, how to achieve this. SO how to connect each member after the import to the right Organization.

#331705

Hello Luit,

Could you please elaborate more on how you performed the import? Types uses a custom field to store the parent post ID: wpcf_belongs_[parent-slug]_id, e.g. wpcf_belongs_organization_id. Please make sure that you are importing the right custom fields to the child post.

You can also connect your custom posts manually. To do this, you need to edit each parent post (each Organization) and you'll have to add all Members to the Post Relationship section.

#331747
2015-09-08 13_28_04-10.101.101.27.png
2015-09-08 13_28_42-Lid Bewerken ‹ test — WordPress.png

I use WP All import PRO to import the different xml files. When importing I select the relational record to be put in the _wpcf_belongs_[slug]_id. When I take a look in the database _wpcf_belongs_[slug]_id has the right value, but in the post it self (Postrelationship) nothing is shown. (see screenprints).

#331753

I noticed something, I should use the post ID in the belongs field an not another value. Will work on this.