Changing Background for One Specific Collection Page - Taste Theme

Changing Background for One Specific Collection Page - Taste Theme

raynuh
Visitor
1 0 0

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.

Replies 4 (4)

dannyelo
Shopify Partner
184 37 37

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,

❤️ Enjoyed my Shopify customization assistance? If I've helped you achieve your goals, consider showing your appreciation with a coffee tip! It means the world to me! ️ Thank you!
Buy me a coffee here
dpfuenza
Excursionist
11 0 0

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!

dannyelo
Shopify Partner
184 37 37

Hello,

 

Depends on the theme you are using.

Whats your website domain? And which collection you need to change the background?

❤️ Enjoyed my Shopify customization assistance? If I've helped you achieve your goals, consider showing your appreciation with a coffee tip! It means the world to me! ️ Thank you!
Buy me a coffee here
dpfuenza
Excursionist
11 0 0

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!