Skip Navigation

[Resolved] CPT relationship based on a taxonomy

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

Problem:
How to display posts that shares same taxonomy terms of different post type

Solution:

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/cpt-relationship-based-on-a-taxonomy/#post-618935

Relevant Documentation:

This support ticket is created 6 years, 1 month 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Author
Posts
#618012

Hi,
Is it possible to create a cpt relationship between two posts from different CPTs that share the same taxonomy?

Let's say 2 post types share a hierarchical taxonomy called Languages and the language value for both of these posts is German. In the content template for one of the cpt, could it be possible to use a shortcode to create a link pointing to the post of another CPT that shares the same taxonomy value, ie German?

Thanks,

Daniel

#618124

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Yes - its possible but it depends upon where you want to display the related term posts?

For example - you are displaying single post 1 with German taxonomy term, and now you want to display another (post 2) post which is having German term assigned on this single post - correct?

If yes: could you please setup your content with two posts having same taxonomy term assigned and share problem URL with me and tell me where exactly you want to display another post of which post type.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#618612

Ok.

I have created two posts from different post types that share the same taxonomy:

Post 1:
hidden link

Post 2:
hidden link

These posts share the value "Inglés" of the taxonomy "Idiomas".

I want to display, somewhere on Post 1, a link that points to Post 2 (post title with a link) based on their sharing the same taxonomy.

Here are the login details: (PLEASE HIDE THE CONTACT DETAILS FROM PUBLIC VIEW)

access details

Thanks for your help!

Daniel

#618872

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - unfortunately, the access details you shared with me is not working. Could you please resend me working access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#618935

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please check now with following link: hidden link

At bottom of the page you will see the section "Related Taxonomy term posts" and where you will see its displaying the related post.

This is the view which is displaying the related post:
hidden link

#620422

Perfect. Thanks!

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