Saltar navegación

[Resuelto] Display parent post url using post reference

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 6 años, 5 meses. 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
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)

Etiquetado: 

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por vimalS hace 6 años, 5 meses.

Asistido por: Christian Cox.

Autor
Mensajes
#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!!