Skip Navigation

[Gelöst] Display parent post url using post reference

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 5 Jahre, 8 Monate. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. 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 Antworten, has 2 Stimmen.

Last updated by vimalS vor 5 Jahre, 8 Monate.

Assisted by: Christian Cox.

Author
Artikel
#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!!

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