Jump to content

Changing logo on select pages - code not working

Recommended Posts

Site URL: https://www.ashleyolafssonphotography.com/weddings

Hello!
 
 I am wrapping up a website for a client using a SquareMuse template they purchased. The navigation appears transparent when overlaid on banner images which are on most pages. However, I'd like to change this for pages that do not have a banner image up top. I tried an invert code, and dislike the appearance of the logo inverted. I also tried adding a background color to select pages, with no luck. Now I am thinking the best option will be to change the logo on select pages on the website, but none of the codes I am using are working properly. Attached is a screenshot of the appearance, and the URL is ashleyolafssonphotography.com/weddings
 
The code I was using is inputted onto the page header code injection.
 
<style>
.header-title-logo img {
visibility: hidden;
}
.header-title-logo a {
background-image: url(https://static1.squarespace.com/static/5c191a80e17ba380e696a460/t/5e73cfd0dd15137f7535f0fa/1584648149782/AshleyO-Primary-Brown-01.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}
</style>
 
I have tried various other codes I've found online and through tutorials, but no luck. I am wondering if there is something in the Custom CSS from the template that is conflicting with this? It is inverting the text but I removed the line that inverts the logo. This is the only thing holding us back from launching, so hoping to find a good solution. Thank you in advanced!
Link to comment
  • Replies 1
  • Views 247
  • Created
  • Last Reply

Above code for Squarespace 7.1. Your site is 7.0

Add this to Page Header to change logo.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$("img.Header-branding-logo").attr('src','https://beaverhero.com/wp-content/uploads/2019/07/coffee-beans-1082116_640-min.jpg');
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.