Hi,
I have a site in development which will be a concert chronology site for a band, detailing all gigs. For each gig, it will have a setlist which obviously needs to be in order. I have gigs as a custom post type, and songs as a custom post type, and I have created a "many to many" relationship between the two CPTs. I have a custom field as part of the relationship which is "Position in Setlist", so that when I come to output the setlist I can have the songs in the correct order (this is similar to the example on your website of CD albums with songs).
I have years of gigs all documented in spreadsheets, including setlitsts. I would be easy for me to include a new column for "Position in Setlist" for each song. I would like to know if any of the import plugins you recommend would enable me to import this from CSV? As it stands I am having to input the songs and setlist positions manually for each gig, which is very time consuming!
Many thanks,
Tim
Hello Tim and thank you for contacting the Toolset support.
Currently, we can only add custom fields to the imported posts and there is no way to add custom fields for a related post or a relationship intermediary post. But, I think this can be done in two steps import.
First import the posts and their related posts with the WP Ultimate CSV Importer Pro plugin, as described in the 4th example of the following article. Then build another CSV file, that will match the intermediary posts with their custom fields and import/update the intermediary posts with their custom fields.
https://toolset.com/documentation/user-guides/export-import/how-to-import-content-into-wordpress-using-csv/import-csv-ultimate-csv-importer-plugin/how-to-import-posts-from-csv-files-and-maintain-relationships-when-using-the-csv-importer-plugin/#example-4-many-to-many-relatinship-with-the-intermediary-post-type
I hope this answers your questions. Let me know if you have any other questions.
This is great Jamal, thanks, I'm making progress but I've hit a strange problem/bug.
When I import a setlist for a gig (the gig is already there so I'm updating the post using WP Ultimate CSV Importer Pro), it creates the first 10 songs as intermediary posts, but misses out the rest (i can see this when I go in to the relationships Intermediary Posts area in WordPress). Strangely, if I then go in to edit the gig and scroll down to the Setlist section, all the songs have been added in there. To add to that, it is only the first 10 songs in that section that have had their intermediary posts created, the other songs (so if I click the arrow and move on to page 2 of that section) are the songs that didn't get an IP created.
Strange behaviour and I can only assume some kind of bug stops the IP creation process at 10? But still adds all the songs to the gig somehow, as they are there when I go in to edit the gig.
Any thoughts appreciated!
Thanks for your help,
Tim
I've just changed the Pagination of the setlist area to 30 and that fixed the problem, pretty strange that it relies on front-end pagination but I'm guessing it'll make sense to you!
I have another more pressing issue now, in my CSV in the "Posts to be connected" column (so laid out the same as your example you linked to), it breaks if the name of any post in this column contains a comma or forward slash (I imagine other special characters as well). Do you have an thoughts on how I could get around that? Every single post I have contains commas and forward slashes in the title (dates and venue name, locations).
Many thanks,
Tim
Hello Tim,
Make sure that the values are correctly escaped. Values that are wrapped with a double-quote, should be wrapped inside another double-quote in order to be escaped correctly.
https://toolset.com/documentation/user-guides/export-import/how-to-import-content-into-wordpress-using-csv/import-content-csv-importer-plugin/#all-values-must-be-escaped
If that did not help, I can create a new installation on our platform, we can work on it together with sample data until we get this resolved or found the real issue behind it.
Best regards,
Jamal