Skip Navigation

[Résolu] Display parent post url using post reference

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 6 années et 3 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par vimalS Il y a 6 années et 3 mois.

Assisté par: Christian Cox.

Auteur
Publications
#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!!