Skip Navigation

[Resolved] Link posts of the same CPT

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to Link posts of the same CPT in a relationship.

Solution:

This is possible if you enable the hierarchical relationship on your CPT. If you go to Toolset->Custom Post Types and edit your cpt, under the options tab you should see the Hierarchical option to allow for your CPT have parent/child relationship amongst itself using the default wordpress relationship.

It functions the same as if you were to go to Pages and set another page as its parent.

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

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 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 8 replies, has 2 voices.

Last updated by Ben 5 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1213279

Ben

What is the best way to link posts of the same CPT? I know it is not possible to create a relationship between two of the same CPTs.

I have a need to be able to show "related" items that will be set manually.

#1213286

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ben,

Thank you for getting in touch.

This is possible if you enable the hierarchical relationship on your CPT. If you go to Toolset->Custom Post Types and edit your cpt, under the options tab you should see the Hierarchical option to allow for your CPT have parent/child relationship amongst itself using the default wordpress relationship.

It functions the same as if you were to go to Pages and set another page as its parent.

Please let me know if this helps.
Thanks,
Shane

#1213287

Ben

Hello Shane.

Thank you for the information.

Would these "relationships" be able to be queried using Views then?

#1213309

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ben,

Yes it can be and it's done by using the Post Parent filter.

Thanks,
Shane

#1213369

Ben

Thank you Shane.

Is there any relevant documentation for this?

Just so I can try and see if this would suit my purpose.

#1213388

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

#1213417

Ben

Thank you Shane.

#1213437

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ben,

If there are no further questions on this then you can mark this one as resolved.

Thanks,
Shane

#1214214

Ben

My bad! I meant to do this last reply.

Thank you again Shane.