Skip Navigation

[Resolved] Is it possible to mass update relationships?

This thread is resolved. Here is a description of the problem and solution.

Problem:

I need to bulk connect hundreds of “therapist” posts to many “treatment” posts in a many-to-many Toolset relationship, but manually linking each one is extremely time-consuming.

Solution:

Export the relationships to a CSV or spreadsheet, bulk edit them using an external tool, and re-import using a compatible importer. Alternatively, use the WP Sheet Editor plugin which supports Toolset relationships for bulk editing directly in a spreadsheet-style interface within WordPress.

Relevant Documentation:

https://toolset.com/forums/topic/many-to-many-relationship-using-csv/

https://toolset.com/course-lesson/bulk-editing-toolset-content-with-wp-sheet-editor/

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 3 replies, has 1 voice.

Last updated by Christopher Amirian 2 weeks, 4 days ago.

Assisted by: Christopher Amirian.

Author
Posts
#2810184

I have a many to many relationship between two custom post types, "therapists" and "treatments".

I need to go through and update all of the therapist objects with an updated list of treatment services that they treat. As it is now, going through each one and manually clicking "Connect existing treatment", then typing to search, and adding each treatment one by one, takes a great length of time. There are many dozens of treatment services and hundreds of therapists, so updating all of them in this manner seems unnecessarily tedious.

Is there a way that I can make this process faster, perhaps through the relationships api, uploading a csv of relationships, some type of bulk editor function in WordPress, or by using something like a Toolset repeatable checkboxes field tied to relationships so I can select all the treatment services offered by a therapist and add them all at once?

Is something like this possible, and if so, would I have to manually go through each post and update them again for that relationship to propagate correctly?

Once they've all been updated once, using the regular process of connecting treatments should be less of a burden, but I figured that before I bite the bullet and spend days going through the normal process I should at least check if there is a faster way.

#2810237

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Welcome to Toolset support. There is no bulk editing functionality available in Toolset.

One idea could be to export the relationships to a CSV, excel file, do the edits there with any tool you want and import back the relationships.

I am not sure how feasible that would be but I thought I would give you the idea.

You can learn more about various methods of import/export here:

https://toolset.com/forums/topic/many-to-many-relationship-using-csv/

Thanks.

#2810462

That forum topic is helpful, and I'll look into it more.

I also found this old forum topic from 2021 about a plugin that Toolset seems to work with for this functionality: https://toolset.com/course-lesson/bulk-editing-toolset-content-with-wp-sheet-editor/

Is this information still accurate and that plugin still integrated with toolset?

#2810514

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Yes from what I see we do not have any reported issues regarding that plugin so it should work.

Thanks.