I am trying to get the clickthrough URL of each image in my galleries to open in a new tab. I did some digging and I noticed that each gallery image has the <div class="margin-wrapper"> on it. So I am thinking if I can have anything that has that class open in a new tab I should be good?
How can I change all external links contained within <div class="margin-wrapper"> to automatically open in a new blank target tab?
Question
joeljanski
I am trying to get the clickthrough URL of each image in my galleries to open in a new tab. I did some digging and I noticed that each gallery image has the <div class="margin-wrapper"> on it. So I am thinking if I can have anything that has that class open in a new tab I should be good?
How can I change all external links contained within <div class="margin-wrapper"> to automatically open in a new blank target tab?
Edited by acalvoretag
Link to comment
Top Posters For This Question
3
2
2
5
Popular Days
May 12
3
May 1
2
Jun 23
2
Oct 29
2
Top Posters For This Question
kathryn 3 posts
zoebrock 2 posts
keren 2 posts
tuanphan 5 posts
Popular Days
May 12 2020
3 posts
May 1 2015
2 posts
Jun 23 2015
2 posts
Oct 29 2019
2 posts
Popular Posts
Tarjo
I came across this similar issue when displaying blog posts in a summary block. If the "Link Post Title to Source URL" option is selected, there is no way to make the link open in a new tab. I fo
tajbarr
To make them universal just place this code in header injection on all pages you wish all links to be forced to open in a new tab: <base target="_blank"/> Works really well.
PeterCBlanchard
This only works if you are coding the link yourself. You can't put that stuff in the Clickthrough URL for an image . . . when I try it tells me to please enter a valid URL.
28 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment