I am looking for solutions to change just the color of the add to cart button on my home page, without affecting other button colors throughout the store.
I’m assuming I have to edit the theme code but that is beyond my expertise so any help would be greatly appreciated. Thank you!
Hello @kprieto1023
Thank you for submitting your query to the Shopify community. I’d be happy to assist you. Could you please provide the store URL and password (if it’s password-protected) so I can review and get back to you with an update?
Hi @kprieto1023
In order to fulfill your request, please follow these steps
Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above
{% style %}
{% if template.name == "index" %}
.image-with-text__text.rte.body + a.button.button--primary[href="/collections/all"] {
background: orange;
}
.image-with-text__text.rte.body + a.button.button--primary[href="/collections/all"]::after {
display: none !important;
}
.banner__buttons > a.button.button--secondary[href="/collections/all"] {
background: red !important;
}
.banner__buttons > a.button.button--secondary[href="/collections/all"]::after {
display: none !important;
}
{% endif %}
{% endstyle %}
Here is the result:
I hope this helps
Best,
Daisy
I appreciate your reply.
Store url is celestenoir.shop and I just want to change the add to cart button, not all the button colors please.