Skip Navigation

[Resolved] Display parent post url using post reference

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

Problem: I have two CPTs, "Landing Pages" and "Services". on the Landing Page CPT, I have a post reference field to link to a Service post. I have created a View of all Services, and I would like to display a link to the related Landing Page.

Solution: Use the post selection tab of the post link dialog to select the reference post. Modify the shortcode to select the proper relationship reference:

[wpv-post-url item="@eh-linked-service-or-service-provider.child"]
This support ticket is created 6 years, 3 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.

Our next available supporter will start replying to tickets in about 0.36 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by vimalS 6 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1082921
Screenshot_1.png
Screenshot_2.png
Screenshot_3.png
Screenshot_4.png

Tell us what you are trying to do?

I have 2 custom post types
1) Landing pages
2) Services

Each service has landing page so I have setup post reference field connecting above 2 post types..
Now, I have created view to display services and put below line to display related landing page url but it is not displaying anything..

[wpv-post-url item="@eh-linked-service-or-service-provider.parent"]

Please check attached screenshot for better understanding..

#1083189

Hi, I think in this case the GUI inserted the shortcode with the wrong parent/child reference indicator. You may have to flip from parent to child. Try this instead:

[wpv-post-url item="@eh-linked-service-or-service-provider.child"]

Let me know if the problem is not resolved.

#1084607

Yes, Working
Thanks!!