Jump to content

Replace logo image on just ONE page (Template: Jones)

Recommended Posts

Posted

Hi, I have tried several injection codes and even some custom CSS to try to override the logo image on just one of my pages. The page is a shop page. Here are some of the injection codes I have tried:


<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
</script>
<script>
$(function() {$('#logoimage').find('img').attr('src', 'https://static1.squarespace.com/static/5bf1b4f6f8370a9863e71c8d/t/5d4525d5b0f59800018daf77/1564812757406/destashlogo_2_original.png')})
</script> 

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
</script>
<script>
$(function() {$(‘#top’).find('img').attr('src', 'https://static1.squarespace.com/static/5bf1b4f6f8370a9863e71c8d/t/5d4525d5b0f59800018daf77/1564812757406/destashlogo_2_original.png')})
</script>

<script>
      window.onload = function() {
        document.getElementsByClassName('Header-branding-logo')[0].src = 'https://static1.squarespace.com/static/5bf1b4f6f8370a9863e71c8d/t/5d4525d5b0f59800018daf77/1564812757406/destashlogo_2_original.png';  
      };
    </script>


None of those have worked. Can't figure out what I am doing wrong!link to website: www.lexadazy.com

  • Replies 7
  • Views 807
  • Created
  • Last Reply
Posted

@lexcamille Add this CSS to HOME > DESIGN > CUSTOM CSS


/* Hide current logo on shop page */
#collection-5bf23f6188251b677dff5605 .logo-image img {
   visibility: hidden;
}
/* Insert new logo on shop page */
body#collection-5bf23f6188251b677dff5605 .logo-image a {
   background-image: url(https://image.flaticon.com/icons/svg/1279/1279537.svg);
   width: 50px;
   height: 50px;
   display: block;
   background-size: contain;
   background-position: center center;
   background-repeat: no-repeat;
   margin-top: 20px;
   margin-bottom: 20px;
}

See how to insert CSS: https://beaverhero.com/squarespace-how-to/#HowtoInsertCustomCSS

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!)

Posted

Done! Thanks, new here. This worked for overriding the logo on mobile too! My only question now is, is there a line of code I could use to make this work for all of the product pages under that collection in my shop (the regular logo is still showing when I click into my product listings) or would I have to repeat this code for each page with each individual data item ID?

Posted

Sorry to keep bothering you :( this didn't work for me. Is this how it should look?


/* Hide current logo on shop page */
.collection-type-products.view-list .logo-image img {
    visibility: hidden;
}
/* Insert new logo on shop page */
.collection-type-products.view-list .logo-image a {
    background-image: url(https://static1.squarespace.com/static/5bf1b4f6f8370a9863e71c8d/t/5d4525d5b0f59800018daf77/1564812757406/destashlogo_2_original.png);

etc (shortened for character limit)

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.