I'm trying to make a CSV file to import lots of data into the website.
i've made two custom post_types. First "kandidaten" which are related to "partij"
My relationship_slug is "deelnemende-partij-kandidaat"
So I want this import to place all "kandidaten" which are connected to a "deelnemende-partij"
How can I manage this. I think my table head title is wrong "csv_toolset_associations_deelnemende-partij-kandidaat" see image
Hi,
Thank you for contacting us and I'd be happy to assist.
As explained in the documentation ( ref: https://toolset.com/course-lesson/importing-content-from-csv-with-post-relationships/ ), the relationship information should be passed through the CSV file in column with the meta key "_toolset_associations_%relationship_slug%".
Based on this the correct meta key for the relationship "deelnemende-partij-kandidaat" would be "_toolset_associations_deelnemende-partij-kandidaat".
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Hi Waqar,
Thanks that is just what I needed! Still have one more question:
Is it possible when "partij" doesn't exist it will be automatic add as a new "Partij"?
Thanks for writing back.
This extra column in the import file will only store the title of the related post as the special custom field value, which can later be used by the relationship import process to connect the related posts. It will not create new posts if they don't already exist.
You can import any "Partij" as new posts the same way as you're importing the "kandidaten" posts. You'll just have to make sure that the post title supplied through the "_toolset_associations_deelnemende-partij-kandidaat" column correctly matches.