Hello,
I'd like to know if it's possible to add post relationships in bulk using a taxonomy for example.
Right now, I have over 400 lessons from the same coach already published.
I've created a CPT for Coaches and for Lessons but if I have to do it one by one, it's going to take forever.
Also, it would mean that evry time we add a new lesson, we have to add manually the post relationship. Not very convenient...
Hi, there's only one way to do this in wp-admin, and it involves importing post content with a CSV file. This method doesn't involve any extra code, only an understanding of CSV files and some patience. We have some documentation about this method available here: https://toolset.com/documentation/user-guides/importing-content-from-csv-with-post-relationships/
As an alternate method, using the WordPress API and Toolset Post Relationships API you can write custom code that loops over all the posts and connects them as needed. We have some documentation about programmatically connecting posts here: https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts
The information for the WordPress API to query posts is available here:
https://codex.wordpress.org/Class_Reference/WP_Query
This method would require knowledge of PHP.
Let me know if you have questions about either method and I'll be glad to give you more details.