Open external link from my footer menu in a new tab

Tourist
9 0 1

Hello everyone,

This trick doesn't work on my theme (debut)

https://help.shopify.com/manual/sell-online/online-store/menus-and-links#new-browser-tab

Any other idea ?

 

1 Like

Any chance of seeing a link to this in action? It's much easier for the forum members to troubleshoot things when they can see it working (or not) and see the debug logs live.

You need to add the below attribute in the anchor tag. 

target="_blank" 

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: ecommercewebguru@gmail.com
Skype: ecommercewebguru
0 Likes
Tourist
9 0 1

Thanks for the reply, my site is set to private atm, can't open it, sorry for that...

Where is this anchor tag you're talking about ? in theme.liquid or footer.liquid ?

0 Likes
Tourist
9 0 1

Hello again, can you be more specific ? In the liquids section, where can I find and edit my customized menu ?

0 Likes
Tourist
9 0 1

Hello again, didn't find out how to do it yet, here's the link to my page with password.

The link I want to be opened in a new tab is the SOCIAL link in my footer.

https://la-bleue.myshopify.com

pass : hawthi

0 Likes
Tourist
9 0 1

I really need some help please

0 Likes
Tourist
9 0 1

Hello everyone and merry Christmas,  I thought I was getting some help for christmas but obviously not...

Can you help me before 2017 ? Thanks

0 Likes
Shopify Partner
2536 31 563

Hi J!

The debut theme is new and many old tricks do not work for it straight away. I would suggest to remove this <script> section you've added to your theme.liquid and instead add the following to the bottom of the footer.liquid in the Sections folder:

{% javascript %}
 jQuery('a[href^="http"]').not('a[href^="{{ shop.url }}"]').attr('target', '_blank');
{% endjavascript %}

Same thing, different place. Worked for me.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com! My post solved your problem? This is my Paypal too :)
1 Like
Tourist
9 0 1

Thanks Tim, it worked !

0 Likes
Highlighted
New Member
4 0 0

Is there a similar way to do this for one single item in the Header's Navigation Menu? We have an external link to our primary website and would like it to open in a new tab. Thanks!

0 Likes