Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: How to make my button links open in a New Tab? Dawn Theme

Solved

How to make my button links open in a New Tab? Dawn Theme

LSAccounting
Trailblazer
205 1 31

So when someone clicks on one of my buttons, it opens a new tab with the link.

 

I don't seem to find an option for it under the button.

Shopify Community MHS.png

 

By L&S Team
Accepted Solution (1)

Dan-From-Ryviu
Shopify Partner
10256 2038 2109

This is an accepted solution.

You can do that by editing image-with-text.liquid file of your theme in Online store > Themes > Edit code > open image-with-text.liquid file, add this part below in a tag of button and Save the file 

target="__blank"

Screenshot 2023-08-15 at 15.29.18.png

 

- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

View solution in original post

Replies 8 (8)

Dan-From-Ryviu
Shopify Partner
10256 2038 2109

This is an accepted solution.

You can do that by editing image-with-text.liquid file of your theme in Online store > Themes > Edit code > open image-with-text.liquid file, add this part below in a tag of button and Save the file 

target="__blank"

Screenshot 2023-08-15 at 15.29.18.png

 

- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

LSAccounting
Trailblazer
205 1 31

@Dan-From-Ryviu 

 

Omg, it actually worked! 

 

Thank you.

By L&S Team
mjerez
Visitor
1 0 0

I tried this solution with the Sense theme, but it didn't work.

Dan-From-Ryviu
Shopify Partner
10256 2038 2109

Hi @mjerez 

Could you take a screenshot of the code that you added? 

 

- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

mrbicho
New Member
6 0 0

Hi, I want to to the same thing. When someone click on my Banner it should open a new tab, I have changed the code as you have described, but it doesn´t work. Could you please assist? Bildschirmfoto 2024-04-03 um 01.33.42.png

Amuarta
Tourist
4 1 1

This did not work with the Craft theme. Does anyone know of a solution? 

StaceyS
Tourist
12 0 2

Hello -- if I do this will this apply to every button? I only want to do it for one button in particular. Thanks. 

chipndipped
Visitor
1 0 0

Worked perfectly! Thank you so much for the tip