lexcamille Posted August 3, 2019 Posted August 3, 2019 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
tuanphan Posted August 3, 2019 Posted August 3, 2019 @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!)
lexcamille Posted August 3, 2019 Author Posted August 3, 2019 Awesome, this worked great - thank you so much!!!
tuanphan Posted August 3, 2019 Posted August 3, 2019 @lexcamille You're welcome. Accept answer if it worked. Other members can use if they know it worked. Have you a great weekend :-D 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!)
lexcamille Posted August 3, 2019 Author Posted August 3, 2019 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?
tuanphan Posted August 3, 2019 Posted August 3, 2019 @lexcamille Line 2 & Line 6. Replace body#collection-5bf23f6188251b677dff5605 with .collection-type-products.view-list (Remember there is a dot in front of the collection-type-products) 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!)
lexcamille Posted August 3, 2019 Author Posted August 3, 2019 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)
tuanphan Posted August 3, 2019 Posted August 3, 2019 @lexcamille Answered in your new question 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!)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.