Shopify themes, liquid, logos, and UX
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?
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.
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 </head>
{% 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
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