-
jondipietro
I’m probably missing something obvious, but I can’t figure out how to add target=”_blank” to dynamic tags. I’m using GB Pro and ACF. Here’s an example of a custom field that contains a sponsor’s website link. It’s rendering fine but I would like it open to another tab.
{{post_meta key:sponsor_website|link:post_meta,sponsor_website|required:false}}
-
Hi there,
You can set the element’s TAG NAME to
a
, and set the link and content separately, you should see the Open link in a new tab option.Here’s a screenshot for your reference:
https://app.screencast.com/y2adGRigGthrC -
jondipietro
Thank you. That did the trick!
Is there a way to do this for a container with a background image?
-
The easy way is to set the container’s tag to
a
, and add the link to it directly.Just make sure there are no other
a
elements in the container to avoid HTML error.
- You must be logged in to reply to this topic.