Skip Navigation

[Resolved] Create post relation association with other value than parent_title

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

Problem: I would like to create a post relationship using some criteria other than post_title, since my post titles may change later.

Solution: In wp-admin, post titles are shown for linked posts. In the database, posts are linked using post IDs. Future modifications to linked post titles will not affect the post relationship Future modification to post IDs may affect post relationships, but this type of change usually only happens during site migrations.

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by stephanW-2 6 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1087638

I would like to create a many to many relationship between two post types. But I would like to connect the child post to something different than the post title of the parent. This because the post title value can possibly change in the near future.

Is this possible with Toolset? Thanks again for your help.

Stephan

#1087694

Hi, when you create a many-to-many (M2M) relationship in Types and add relationships between two posts, the post title is not used in the database to define the relationship. In wp-admin, you will see the post titles linked to one another, but in the database the relationship is defined by post IDs. So if the post titles change later, the post relationship is not broken. If the post IDs change, the relationship can be broken. Normally post IDs do not change unless you try to migrate posts between multiple sites.

#1091920

Thanks Christian! This makes sense and helped me a lot.