Hello i have:
parent post type:contatto
child post type: corso
all is created with types
Tell us what you are trying to do?
I'm trying to import custom post types with parent/child relationship
Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/import-csv-ultimate-csv-importer-plugin/
i can import correctly fields i want, but i can't manage to import child posts in right parent.
I know there is a hidden field _wpcf_belongs_{my-parent-slug}_id, the problem is that Ultimate CSV Importer does not import manual post ID, simply don't work.
There is something i'm missing?
Thanks for any help
Well, I see that this DOC completely misses the parent/child relationship.
I explained it once here, for another Plugin:
https://toolset.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/import-content-csv-importer-plugin/#importing-types-post-relations
You need to map the Custom Field _wpcf_belongs_parent-post-type-slug_id (where you need to adapt the parent-post-type-slug part) and populate this field with the ID of the parent Post (that must exist already in the system, otherwise you will have no ID at disposal)
The new RC versions downloadable in the Beta area of Toolset should provide better methods as the relationships API changed, although, that not work with the current stable Toolset:
https://toolset.com/documentation/user-guides/importing-content-from-csv-with-post-relationships/
Hello Beda and thanks for help.
I can correctly map fields, also _wpcf_belongs_contatto_id, i think my problem is on importing parent post:
i cannot specify a exact post_ID importing, so i have 30.000 "contatti" with nearly random post_ID and i cannot import 30.000 "corsi" without become crazy.
There is a way to force a post_ID importing a post?
Post ID's are something unique for each post, and they are required to be stored in the Database.
The Toolset Relationships as for now store that ID of the parent posts, in the Child Posts' field.
This ID must be known to import Child posts properly.
Hence, first, you should create or import your Parent Posts.
That will generate the ID's that you can use to populate your Child Posts Fields
Wherever the source of those Parent Posts is, whether you import it with CSV or programmatically, WordPress will create the ID of the posts, not the CSV file.
Later, when the posts are created, their ID can be used to populate the Child's posts CSV import sheet.