Skip Navigation

[Resolved] Import Data With Parent And Child Connections

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 9 years, 11 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
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 3 replies, has 2 voices.

Last updated by Adriano 9 years, 11 months ago.

Assisted by: Adriano.

Author
Posts
#219999

I have a custom post type created with Types called Assets.
Each asset is associated with a parent custom post type called Packs
And a child custom post type called Diagrams

I wish to import a large quantity of data into the Assets (easy enough following your post about importing data via csv)
However, how can I associate each asset with it's parent or child at the time of import using fields in the csv?

Or will I have to associate them individually after import?

#220075

Dear Andy,

When using Types posts relationships, we store the parent of a given type in a field _wpcf_belongs_{parent-slug}_id. Assume we are displaying a Car post type that usually has a parent Maker post type. Each Car will store its Maker id in the field _wpcf_belongs_maker_id.

You should use a column called "_wpcf_belongs_packs_id" (if packs is the slug of the Packs post type) in the CSV file. You should store the ID of the parent on this column.

Please let me know if you are satisfied with my answer and if I can help you with any other question which is related with this one.

#220081

Just what I needed. Thank you

#220087

You are welcome.

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.