Problem: I would like to create a link that opens in a new tab, using the URL from a custom field. When I add target="_blank" to the custom field, the link does not open in a new tab.
Solution: Add target="_blank" to a link tag, then use the raw URL field as the link's href attribute.
<a class='w-btn style_solid color_primary icon_none standard-button' href="[types field="newsletter-url" output="raw"][/types]" target="_blank">View Newsletter</a><br>
Relevant Documentation:
https://toolset.com/documentation/customizing-sites-using-php/functions/#url
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)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 6 months ago.
Assisted by: Christian Cox.