Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi
How can I change the colour of the add to cart buttons without changing the colour scheme? I'm assuming this can be done in the code but can't find it anywhere online.
Thanks.
Hi @GGTreasureHunts ,
Could you please share URL and your store password if it enabled? So that we can help you.
Thank you.
Hi @GGTreasureHunts ,
This is Victor from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Asset->/base.css->paste below code at the bottom of the file:
button.product-form__submit.button.button--full-width.button--secondary {
background: black !important;
color: white !important;
}
button.product-form__submit.button.button--full-width.button--secondary:after {
display: none;
}
Note: You can change color value to match your store
Hope my answer will help you.
Best regards,
Victor | PageFly
Hi @GGTreasureHunts ,
The code in my previous answer can be left as is. It will change the button background color on the product page and you can change button background color only home page by below way:
Step 1. Go to Online Store -> Theme -> Edit code
Step 2. Open your theme.liquid theme file
Step 3. Paste below code before </body> :
{% if template == "index" %}
<style>
button.product-form__submit.button.button--full-width.button--secondary {
background: black !important;
color: white !important;
}
button.product-form__submit.button.button--full-width.button--secondary:after {
display: none;
}
</style>
{% endif %}
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025