Skip Navigation

[Closed] Using CPT – CPT relationships in taxonomy style

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

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

This topic contains 4 replies, has 2 voices.

Last updated by Caridad 9 years, 2 months ago.

Assisted by: Caridad.

Author
Posts
#283345

I am trying to: Assign CPT to CPT many to many with a simpler interfact

I visited this URL:

I expected to see:

Instead, I got:

#283354

I don't know why my entire post wasn't put on here? I don't get it.

Anyway - I wanted to know if you can link a CPT to a CPT in a many to many relationship, but be able to edit what the relationships are in a category/taxonomy type way.

It seems convoluted to have to add it in with a third table - at least the way you physically add it anyway.

The site I am making has 30 disciplines that can be assigned in a M2T relationship to 50 sporting clubs. The sporting clubs are obviously CPTs as they have a bunch of data to display.

But I want the disciplines to have their own page too with info. But I want them to be assignable like you assign cats.

Does that make sense?

On a club page you can see the info, and then see the disciplines that are available there in a bullet list. The list would be linked to the actual discipline page. Conversely on the discipline page, it would have info on it, plus a dot point list of the clubs that you can do the discipline at.

But in the backend, it would be awesome if each club had a check box list where you have to just click all the disciplines.

Cheers!

#283599

The way to store the data is with a third table, this the way:

https://toolset.com/documentation/user-guides/many-to-many-post-relationship/

I understand that the resulting interface is complicated and slow to use.

However, I'm glad to say that we already working on a better interface to establish relationships for next major release, but we don't have a date yet because we have only just released Views 1.7

Please let me know if you are satisfied with my reply and any other questions you may have.

Regards,
Caridad

#283641

That's great news. The idea of having the joining table less visible is awesome - if and when that happens.

I wanted to know if I can change the direction of the link though, for the taxonomy.

I decided to make the disciplines as a taxonomy, and the clubs as a CPT. The clubs can have whatever disciplines they need. This works well.

But, when you list the disciplines on a club, they are links - and the links go to the archive for that taxonomy. What I'd rather is that link goes to a page on that discipline - which has info about it, a picture or two - and THEN a list of the clubs where you can practice that discipline. I know this could be done with CPT <-> CPT as you mentioned but that makes it hard for them to manage.

#285137

What I understand in your last reply is that you don't really need a many-to-many relationship here. You could do what you want with just a custom post type and a custom taxonomy. Each discipline already has a description field, what you can use is a plugin like this one to make the uploading of images easier:
https://wordpress.org/plugins/rich-tax-description-editor/

Please let me know if you are satisfied with my reply and any other questions you may have.

Regards,
Caridad

The topic ‘[Closed] Using CPT – CPT relationships in taxonomy style’ is closed to new replies.