Jump to content

Make logo on shop page white and logo on product details page black; site default is black logo

Recommended Posts

I have a website, wareagleforge.com.

The default logo for the website is a black png. On several pages with dark headers, I've used code to make the logo white. The shop page is one example of a page with a dark background so I've used the code on that specific page to make the logo white. But it turns out that the product details pages inherit that change. My product details pages do not have a dark background for the header so you cannot see the white logo on the white background. I'd like to ONLY use the black logo on the product details page and NOT on the shop page. I've tried every example I could find online and nothing seems to achieve what I'm trying to do.

Any ideas?

This is the code I'm using on the shop page under settings>advanced>page header code injection to make the logo white on the dark header background.

<style>
  .header-title-logo img {
    visibility: hidden;
}
.header-title-logo a {
    background-image: url(https://images.squarespace-cdn.com/content/65c65e0fea861123a7439f1d/e8435e52-c247-4757-8e74-aa4a3cc8053f/logo+with+name+larger+white.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}
</style>

Link to comment
  • Replies 1
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

4 hours ago, jesspetro said:

I have a website, wareagleforge.com.

The default logo for the website is a black png. On several pages with dark headers, I've used code to make the logo white. The shop page is one example of a page with a dark background so I've used the code on that specific page to make the logo white. But it turns out that the product details pages inherit that change. My product details pages do not have a dark background for the header so you cannot see the white logo on the white background. I'd like to ONLY use the black logo on the product details page and NOT on the shop page. I've tried every example I could find online and nothing seems to achieve what I'm trying to do.

Any ideas?

This is the code I'm using on the shop page under settings>advanced>page header code injection to make the logo white on the dark header background.

<style>
  .header-title-logo img {
    visibility: hidden;
}
.header-title-logo a {
    background-image: url(https://images.squarespace-cdn.com/content/65c65e0fea861123a7439f1d/e8435e52-c247-4757-8e74-aa4a3cc8053f/logo+with+name+larger+white.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}
</style>

Can you share your URL so I can take a look?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.