Skip Navigation

[Resolved] Link to referenced pages in a Relationship

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Ben 6 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1122006

Ben

I am using the below to display the linked Country Name on a City CPT that is linked within a Country and Cities Relationship.

[types field='country-name' item='@country-cities.parent'][/types]

Is there any way to make this dynamically clickable to the Country?

I would like it so the link points to whichever CPT Country is linked?

#1122572

Hi Ben,

Thank you for contacting us and I'll be happy to assist.

To make the country name a clickable link, you can wrap your shortcode inside a "wpv-post-url" shortcode, like this :


<a href="[wpv-post-url item='@country-cities.parent']">
[types field='country-name' item='@country-cities.parent'][/types]
</a>

Following are some useful guides on the topic:

https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-related-child-posts/
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/

I hope this helps! Please let us know if there's anything else we can help you with.

regards,
Waqar

#1123845

Ben

Thank you for your help Waqar!

Very helpful.