Changing the background color of just one page - Venture theme

Hello,

I am trying to change the background color of just my homepage without it affecting all of my other pages. I like the gray background on the homepage but want to use a lighter blue on all the other pages so my headings pop. I am currently using the Venture theme.

My website is www.theventuresyndicate.com for your reference.

Thank you in advance.

Jaime

You can add a condition in the “.css” file of your theme to change the background of the “index” page only.

Hope it would be helpful

Great can you give me an example of what that code would look like and where I should put it in the “.css” file? I’m still learning this whole coding thing.

Thanks a bunch!

{% if template == ‘index’ %}

body { background-color: red; }

{% endif %}

I put that at the bottom of my theme.scss.liquid file and unfortunately nothing changed.

@Jaime23

Follow below steps:

  1. Go to your code editor > theme.liquid and paste this code above

{% unless template == ‘index’ %}

.page-container {
background-color: blue !important;

}

{% endunless %}


If helpful then please Like and Accept Solution. Want to modify or custom changes on store Hire me. Feel free to contact me on shopify.dev.34@gmail.com | Shopify Design Changes | Custom Modifications In to Shopify Theme

1 Like

This worked. Thank you so much!