All things Shopify and commerce
This is an accepted solution.
Hi @UtopiaCaffe hopes it will help you
To make all buttons on a web page redirect to a new tab when clicked, you can add the target="_blank" attribute to each button's HTML code. This attribute instructs the browser to open the link in a new tab. Here's an example of how you can modify a button's HTML code:
Before modification:
<button onclick="window.location.href='your_destination_url'">Click me</button>
After modification:
<button onclick="window.open('your_destination_url', '_blank')">Click me</button>
In the modified code, window.open is used with the parameters 'your_destination_url' (replace with the actual URL you want to redirect to) and '_blank' (which specifies to open the link in a new tab).
Please note that modifying HTML code might require access to the source code of the website or application. If you're using a Content Management System (CMS) or a website builder, the process may vary. Additionally, be mindful of user experience, as forcing all links to open in new tabs might not be the best practice for usability.
This is an accepted solution.
Hi @UtopiaCaffe hopes it will help you
To make all buttons on a web page redirect to a new tab when clicked, you can add the target="_blank" attribute to each button's HTML code. This attribute instructs the browser to open the link in a new tab. Here's an example of how you can modify a button's HTML code:
Before modification:
<button onclick="window.location.href='your_destination_url'">Click me</button>
After modification:
<button onclick="window.open('your_destination_url', '_blank')">Click me</button>
In the modified code, window.open is used with the parameters 'your_destination_url' (replace with the actual URL you want to redirect to) and '_blank' (which specifies to open the link in a new tab).
Please note that modifying HTML code might require access to the source code of the website or application. If you're using a Content Management System (CMS) or a website builder, the process may vary. Additionally, be mindful of user experience, as forcing all links to open in new tabs might not be the best practice for usability.
Agree with this solution
Thank you so much.
My code doesn't show this line when I find the section for my buttons. Not sure where to go from here.
},
"button_QnC4rP": {
"type": "button",
"disabled": true,
"settings": {
"button_label": "Shop Here",
"button_link": "https://prima-coffee.com/equipment/technivorm/79112-techn-pp",
"button_style_secondary": false
}
}
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025