Problem:
So now I have:
Director CPT as parent of Movie CPT
Cast CPT as parent of Actor CPT and Movie CPT
Production Group as parent of Producer CPT and Movie CPT
Is it possible to search for a Child (Movie) by associated relationships (Actors) of it's parent CPT (Cast)? And if so, how so?
If not, then do you think it's possible to implement some naming methodology for the intermediary CPT that includes the actors that would allow for this?
Solution:
A1) Cast CPT as parent of Actor CPT and Movie CPT
To setup many-to-many relationships between post types "Actor" and "Movie", you will need to setup "Cast" as child post type of "Actor" and "Movie".
See our document:
Creating and Displaying Many-to-Many Post Relationships
https://toolset.com/documentation/user-guides/many-to-many-post-relationship/
Same as above, I suggest you setup Many-to-Many relationships between below post types:
Movies and Directors
Movies and Producers
A2) Is it possible to search for a Child (Movie) by associated relationships (Actors) of it's parent CPT (Cast)? And if so, how so?
Yes, it is possible to search for a Child (Movie) by associated relationships (Actors), see above document:
Displaying Many-to-Many Relationships Using Views
https://toolset.com/documentation/user-guides/many-to-many-post-relationship/#4
Relevant Documentation:
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
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/Hong_Kong (GMT+08:00)
This topic contains 2 replies, has 2 voices.
Last updated by Geoffrey Cleverley 7 years, 10 months ago.
Assisted by: Luo Yang.