Skip Navigation

[Resolved] Using Post Reference Field to Display Data posts of the same post type

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

Problem:

The issue here is that the user wanted to use the post reference field to relate posts of the same CPT

Solution:

Unfortunately you are not able to have a post reference field of a Post of the same custom post type.

What I recommend that you do is to allow the Hierarchical parent/child setup in the CPT by going to Toolset->Settings scroll to options and check hierarchical.

This way you can add a parent post of the same post type as a "reference"

Alternatively the customer was able to resolve the issue with this plugin below.
https://wordpress.org/plugins/custom-related-posts/

This support ticket is created 5 years, 10 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 2 replies, has 2 voices.

Last updated by David 5 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1196639
Impossible to choose the same custom post type.png

Hi There!

I´m trying to show posts related using this field (post reference). I´ve read all the documentation about it here but isn´t working: https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/using-post-reference-fields-to-display-information-from-a-related-post/

Thing is that I trying to create a custom field in order to connect a custom post type called "Realizaciones" with another custom post types (one or more "Realizaciones").

Thing is I can´t to choose the custom post type in a dropdown list (see the image below)

Is it possible to do it?
If not, How could I connect custom post types what belongs at the same custom post type?

#1196758

Shane
Supporter

Languages: English (English )

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

Hi David,

Thank you for contacting our support forum.

Unfortunately you are not able to have a post reference field of a Post of the same custom post type.

What I recommend that you do is to allow the Hierarchical parent/child setup in the CPT by going to Toolset->Settings scroll to options and check hierarchical.

This way you can add a parent post of the same post type as a "reference"

Please let me know if this helps.
Thanks,
Shane

#1196845

Thanks for your reply, Shane (but isn´t works using "hierarchical")

Anyway, I found a solution: if someone needs to customized the related posts, there are a plugin in the repository that works perfectly. It calls "Custom Related Posts" and you can connect the posts related in both directions in the admin post. It works for me!

You can check the edition field appearance here: hidden link

¡Thanks anyway, Shane!