How to make the button links open in same window but new tab?

Hello,I’m using canopy theme and made slide image with button. I would like to make this button links open in same window but new tab. How can I edit the code? Anyone know about this theme?

aaworms.com

Hi @kana-rin-lynn

you have to use target blank from link like below

<a href=“https://community.shopify.com target=”_blank">shopify community

Hi, @kana-rin-lynn ,

I am sorry that I do not buy theme Canopy, so can not check the theme source code.

Please set target attribute to _blank in a HTML element, for example:

[Play Video](https://www.youtube.com/watch?v=vDLpSCj7FBU)

Hope it works,

thanks

1 Like

Thanks for your reply. I still don’t know where can I put this code…do you have any idea?

Thanks for your reply. I still don’t know where can I put this code…do you have any idea?

Thanks for your reply. HTML section is in the liquid??

Hi @kana-rin-lynn ,

Yes, “a” is in a liquid file.

I have no idea about the project structure of the theme you used because I have only free Shopify themes.

  1. Go to online theme → edit code → find the code snippet in a targeted liquid file (just guess, not exact place to modify)

  2. add target=“_blank” in “a” (a stands for one kind of HTML element)

If you can not solve it by yourself, highly recommend hiring a Shopify Partner/Expert/Developer to work it out.

Thanks

Thank you about it. I think I recheck my file.