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 ?
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
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 ?
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.
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.