Toolset allows you to merge existing one-to-many relationships that you used to simulate many-to-many relationships. This automatically creates connections between posts that were linked through linked one-to-many relationships.

Considerations before merging relationships

There are a few important things to consider before proceeding to merge relationships.

  1. Do the merging on a staging copy of your original site, not on a live one.
  2. Any shortcodes, query filters, and custom code that use the slugs of the post relationships you are merging will stop working after the merge. In this case, you will have to manually adjust your site to restore the affected features.

How to merge post relationships

Go to the Toolset -> Relationships page and select the post relationships you want to merge. Please note that you can only select post relationships that share the same child post type. Additionally, that child post type should not be used in any other relationships.

Select Merge in the dropdown menu and click Apply.

Merging post relationships on the Toolset Relationships page
Merging post relationships on the Toolset Relationships page

The Merge relationships dialog appears with a summary of selected post types and the changes that will be applied. It also allows you to customize the name and slug of the new many-to-many relationship that will be created.

The dialog for merging two post relationships
The dialog for merging two post relationships

When you are ready, confirm you understand the involved risks and click Merge. Toolset will perform the merge and provide you with a summary when done.

The Relationships page will now display the new many-to-many relationship.

A many-to-many relationship merged from two existing one-to-many relationships
A many-to-many relationship merged from two existing one-to-many relationships

When you edit existing posts that were connected using linked one-to-many relationships, you will see them automatically connected using the merged many-to-many relationship.

Existing posts are automatically connected using the merged many-to-many relationship
Existing posts are automatically connected using the merged many-to-many relationship