Skip Navigation

[Resolved] Multiple CPT + Multiple Relationships Complex Configuration Question

This support ticket is created 5 years, 12 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.

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 5 years, 12 months ago.

Assisted by: Nigel.

Author
Posts
#781708

Please set this post to private.

Here's what I'm trying to do... I don't need a detailed explanation of the complete setup of this! I just need to provide context for my question which is at the end.

On Episodes, People are related to Products (they recommend or created them).

CPT1 = Podcasts
CPT2 = People
CPT3 = Products
CPT4 = Episodes

Podcasts are hosted by People. Many Podcasts can have many People.
M2M-A: Podcasts [*] << Podcast Hosts >> People [*].
No intermediary needed.

Podcasts have multiple Episodes.
One2M-A: Podcasts [0 .. 1] << Episodes [*]
No intermediary needed.

Episodes have multiple People. Many People can be related to many Episodes. People can be a GUEST or be MENTIONED on the episode.
M2M-B: Episodes [*] << Episodes People >> People [*].
Intermediary CPT5: Episodes People
Custom Field: Dropdown: Guest, Mention.

On Episodes, [Many] People are related to [Many] Products. (e.g.: RECOMMEND, DISLIKE, MENTION, CREATED)
>>>>> THIS IS THE ONE I CAN'T QUITE FIGURE OUT. <<<<<
Ideally, this would be configured in a way where an intermediary post has a selection of People and Product. E.g.: M2M-B: Episode<>Products... where one of the Intermediary Custom Field is a People (CPT2) selection.

The Idea & Problem: An Episode has multiple People that are related to multiple Products. E.g: A Podcast Episode has 3 People (guests), each who RECOMMEND and DISLIKE products.

The outcome would be a Person page that shows all Podcasts, Episodes, Products he/she is related to... and show the Episodes the Person referenced the Products.

Does this make sense?

This may be unnecessarily complex or beyond what Toolset is intended to do. However, it seems like it's so close, so I thought I would (1) see if this makes sense (2) see if I can accomplish this.

#784999

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

Such polymorphic relations are on the lead developer's wishlist, but I wouldn't go so far as to say they are on the roadmap.

You want a 3-way relationship between People, Products, and Episodes, so that you can track who talked about what product on which episode.

I think you could do something like creating a People << People-Products >> Products M2M relationship and then adding a custom field on the relationship that stored the episode it referred to.

It should then be possible to contrive a way to display on a person's profile which products they spoke about in which episodes, for example.

But, the main problem I foresee is one of usability. Namely, you would need to store the post ID of the episode, but wouldn't have a user friendly way of choosing the episode and storing the ID. You would probably need to run some custom code to populate a dropdown where the user could select the episode by title, but that's not trivial.

Before then I would try setting up such a relationship and manually assigning a few episode IDs as a custom field, and then confirming I was able to display the results as required.

Does that make sense?

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.