Header social links open in new tab

Kris12
New Member
1 0 0

Hi

 

I would like my social links that is on the header to be open in a new tab. I dont know much about coding. 

I've seen other similar threads but it is all about footer codes and I couldn't find the "target" for the social links. I read that it has to be set to blank or something but can't seem to find it. 

 

Thank you in advance! 

0 Likes
<p>Check out <a href="https://www.freecodecamp.org/" target="_blank">freeCodeCamp</a>.</p>

Hi,

this is a example 

refer this code & edit your code 

If helpful then please Like and Accept Solution. Free Website Review and advice for sale from Hire us
Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO | Digital Marketing | Site Speed Optimization | Performance Site Audit
For Quick Chat Whats app | Email: pallavi@oscprofessionals.com | Skype : oscprofessionals-87
0 Likes
kldlaz
Excursionist
79 0 6

add this to your theme.liquid

at the bottom


<script>
jQuery('a[href^="http"]').not('a[href^="{{ shop.url }}"]').attr('target', '_blank');
</script>

it works for me supply theme

0 Likes