Skip Navigation

[Résolu] open link in new window

This support ticket is created Il y a 3 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.

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
- 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/Karachi (GMT+05:00)

This topic contains 3 réponses, has 2 voix.

Last updated by martinP-13 Il y a 3 années et 3 mois.

Assisted by: Waqar.

Auteur
Publications
#1893425

i have this in my view , it works fine but I cant get the users website to open in a new window . is it possible?
<a href="[wpv-user field="user_url" target="_blank"]"><i class="fa fa-globe" aria-hidden="true"> Visit Users Website </a><br>
thankyou

#1893463

also how can i add 'show_name' => 'if-not-empty' to it ,so if no entry it doesn't show the text ?

#1893693

Waqar
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

The correct usage of the target="_blank" attribute would be:


<a href="[wpv-user field='user_url']" target="_blank"><i class="fa fa-globe" aria-hidden="true"> Visit Users Website </i></a><br>

And to show this link, only when "user_url" value exists, you can wrap it in the conditional check like this:
( ref: https://toolset.com/course-lesson/using-toolset-conditional-block/#checking-for-shortcodes-values )


[wpv-conditional if="( '[wpv-user field='user_url']' ne '' )"]
<a href="[wpv-user field='user_url']" target="_blank"><i class="fa fa-globe" aria-hidden="true"> Visit Users Website </i></a><br>
[/wpv-conditional]

regards,
Waqar

#1897247

My issue is resolved now. Thank you!

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