Shopify themes, liquid, logos, and UX
Hi there, I have a themed collection dropping today and I'd like to change the background color of just one specific collection page. Not even the products in it, I just want the collection page to be a different color. Haven't been able to find a solution.
I would add a dynamic class to the element you want to change the color, then style it with css.
Example:
<div class="container {%- if collection.handle == 'shoes' -%}my-new-collection{%- endif -%}"></div>
Then you style it:
.my-new-collection {
background: lightblue;
}
Hope this helps,
Hello! I was navigating Shopify community and run into your solution.
Could you please advise where do you put the dynamic class code you suggest, and then the styling css?
Cheers!
Hello,
Depends on the theme you are using.
Whats your website domain? And which collection you need to change the background?
Thank you! I solve it by understanding that collections have a template associated, and each template a theme (colours etc).
So I did that and worked well enough. But would be keen to know how to edit the background only via coding 🙂
I'm using Dawn Theme BTW, the URL is www.contemporanea.co.nz
Cheers!
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025