Passer la navigation

[Résolu] Relationship beetween same custom post type

This support ticket is created Il y a 3 years. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Fuseau horaire du supporter : America/Sao_Paulo (GMT-03:00)

Ce sujet contient 3 réponses, a 3 voix.

Dernière mise à jour par Mateus Getulio Il y a 3 years.

Assisté par: Mateus Getulio.

Auteur
Publications
#2605657

I see that it is not possible to create a relationship with the same CPT.
What's the best way to connect two posts of the same type?

I have a CPT named "profile". I need to create a relationship with two profiles to save as a "friend addition". What's the best way to do it?

#2605693

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01:00)

Hi there

Unfortunately there is no way to do that, it is not supported.

I don't have any kind of workaround for you, I'm afraid, it is only possible to connect posts of different post types.

#2607295

Ok, how can i do this without same CPT relationship?

#2607685

Mateus Getulio
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Sao_Paulo (GMT-03:00)

Hello there,

Thanks for your reply.

The best workaround for your request that I can think is to create another post type, so that it handles and holds the connection you want to have between the posts from the same CPT (Profile).

Then, you could create a relationship of one-to-many and link this new CPT created with the Profiles CPT, and then you could connect two profiles inside the same post from the new CPT. Does it make sense?

Please let me know. Thank you.