Skip Navigation

[Resolved] Open new window for image that links to website – target='_blank' ignored

This support ticket is created 4 years, 5 months ago. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by lindsayH 4 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1375149

I am trying to make sure a custom image links to an external website, the code below works fine but I'm unable to open it in a new window, even tough I'm using target='_blank' in the "a" tag.

<a href="[types field='collaboration-url' output='raw' target='_blank'][/types]">[types field='collaboration-website-image' title='[types field='collaboration-name'][/types]' alt='%%ALT%%' align='left' size='medium' resize='proportional'][/types]</a>
#1375271

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I checked the code you shared and I found that you added the target='_blank' attribute within the Types shortcode:

[types field='collaboration-url' output='raw' target='_blank'][/types]

Actually, you need to add the target='_blank' attribute to anchor tag. Please use the following code that will help you to resolve your issue.

<a href="[types field='collaboration-url' output='raw'][/types]"  target='_blank'>
[types field='collaboration-website-image' title='[types field='collaboration-name'][/types]' alt='%%ALT%%' align='left' size='medium' resize='proportional'][/types]
</a>
#1375359

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.