Sauter la navigation

[Résolu] Open [wpv-post-link] for Custom post type in new tab

This support ticket is created Il y a 5 années et 2 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.

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/Hong_Kong (GMT+08:00)

Marqué : ,

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

Dernière mise à jour par andrewD-10 Il y a 5 années et 2 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1394985

Hi. i wanted my posts opened in new tab on click. lien caché
i have used [wpv-post-title] to open [wpv-post-link] in new tab and its working fine.
Now i want [wpv-post-link item="@agency-post.parent"] to ope in new tab.
i used [wpv-post-title item="@agency-post.parent"] but its opening the related post link, not the custom post type link. Please help me to write code that open custom post type link not the post link.

loop editor code used is. lien caché

Thanks

#1395139

Hello,

Please try to modify the codes you mentioned above as below, and test again:

<a href='[wpv-post-url item="@agency-post.parent"]' target="_blank">[wpv-post-title item="@agency-post.parent"]</a>

The attribute "item" works in both shortcodes [wpv-post-url] and [wpv-post-title], see our document:
https://toolset.com/documentation/user-guides/views-shortcodes/item-attribute/

#1396373

My issue is resolved now. Thank you!