Skip Navigation

[Resolved] Add a relationship between a post and an Intermediary Post

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#2689190

Hi.

I have a relationship between CPT's: MOVIES and an ACTORS.
I add extra custom fields with the "role names" to the intermediary.

I'd like to link a new CPT to the "role names"... is there a way to do it without having the "role names" a CPT ?

#2689425

Hi,

Thank you for contacting us and I'd be happy to assist.

The intermediary post-type setup works only when two post-types are involved in a relationship.

When more than two post types need to be connected, including a central anchoring post type is better.

For example, you can introduce a new custom post type named 'Participation' or 'Contribution' in this case.

CPTs like 'Movies' and 'Actors' won't have any direct relationship between them. Instead, all these CPTs will be linked indirectly through relationships with the 'Participation/Contribution' post type.

- Movies -> Participation/Contribution ( one-to-many relationship )
- Actors -> Participation/Contribution ( one-to-many relationship )
- Third CPT -> Participation/Contribution ( one-to-many relationship )
.......

Any common custom field like "role names" can be added to this new 'Participation/Contribution' post type.

regards,
Waqar

#2689638

Hi Waqar,

Thanks for these explanations.

Now, within a view that will display the "Participation/Contribution" I'm displaying the related actor name and the related Movie name. The thing is that I need to check if a relation exist between the Movies and the Participation/Contribution to display the movie name (and other info). How can I setup the conditional display to check that ?

#2689717

Thanks for writing back.

To suggest the next steps, I'll need to see how these post-relationships are set up and where exactly you need to use this conditional check.

Can you please share temporary admin login details, along with the link to an example page where you need this conditional check?

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

#2689894

Thanks for your help Waqar. I had to do it a different way than planned but it's now more efficient.
thanks for your help.