BACK

how to add a website link via shopify

Shopify - Open Links to Other Websites in a New Tab if you're like me you might have links,on your s

Ed Codes - Shopify Tutorials

Updated on Feb 25,2023

Shopify - Open Links to Other Websites in a New Tab

The above is a brief introduction to how to add a website link via shopify

Let's move on to the first section of how to add a website link via shopify

Let TThunt's experts help you find the best TikTok product on your Shopify business!

Find TikTok products (It's Free)
No difficulty
No complicated process
Find winning products
3.5K Ratings

WHY YOU SHOULD CHOOSE TTHUNT

TThunt has the world's largest selection of TikTok products to choose from, and each product has a large number of advertising materials, so you can choose advertising materials for TikTok ads or Facebook ads without any hassle.

how to add a website link via shopify catalogs

Shopify - Open Links to Other Websites in a New Tab

if you're like me you might have links,on your shopify site that are going to,other websites in my case it's like this,subscribe on youtube button i obviously,want this to open in a new tab i don't,want this to be like people click on it,and then they're taken away from my,website in your case it might be these,uh social media icons for example,obviously don't want people leaving your,site to go to your social media you want,them to stay here and buy something and,you know it's not only things like this,or social media icons actually in the,main menu as well,some stores for example a client of mine,has a quiz and this quiz link goes to,like type form or or another quiz tool,that she's using so obviously that needs,to open in a new tab as well the shopify,interface does not give us an option to,open things in a new tab it would have,been nice i think if we had a check box,here that said open in new tab and you,can check it and then this link would,always open in a new tab but,unfortunately we don't have anything,like that luckily there is a very easy,solution it's very quick with just a few,lines of javascript we can make any,external link open up in a new tab,by any external link i mean any link,that is not your domain,com,would open up in a new tab so i think,that's a pretty good solution let me,show you how to get it done so firstly,you just want to grab the code you'll,find this on my website ed.codes and,then go to tutorials and then find the,tutorial for opening external links in a,new tab and here you can just copy all,of this code and that's all that you,will need so let's copy that next just,go to your themes page on the theme that,you're editing go to actions and then,edit code to open up the code editing,screen and you want to find the main,javascript file for your theme these,files usually end in js or dot js.liquid,like that so you can use the search to,find it quickly i'm looking for a js,file in assets there are a few of these,but for dawn it's called global.js,that's the file that i'm looking for and,also if you're using any other free,shopify 2.0 theme it will also be called,global.js and those themes are craft,sans crave taste studio,and a few others,if you're using debu then it's called,theme.js if you're using another theme,then it might also be called,theme.js.liquid,or it might be called custom.js or it,might be called,main.js or something like that it's the,main javascript file so,once you've got that open all you want,to do is scroll down to the very bottom,and then,paste in that code that you got from my,website save and you're done that's all,you need to do,you can refresh your site and now any,external links including social media,links for example should be opening up,in a new tab,if you like quick tutorials like this,one then subscribe to my youtube you'll,find a lot more and if you're interested,in learning how to actually write code,like this yourself then you might be,interested in my upcoming course which,is about teaching the essentials of,shopify coding to store owners or to,non-developers so that you can take more,control over your stored design and get,a lot of features built without having,to rely on apps or having to rely on,developers too much so if you're,interested in that you should definitely,subscribe to my mailing list to be,notified when that course goes live,that's all for today guys leave a,comment if you have any questions and,i'll see you next time

Congratulation! You bave finally finished reading how to add a website link via shopify and believe you bave enougb understending how to add a website link via shopify

Come on and read the rest of the article!

Browse More Content