Alpi87 Posted November 12, 2020 Share Posted November 12, 2020 Site URL: https://www.murmali.com/shop/cork-bucket-gamma-natural Hi there! I am trying to change the logo in only my product pages (all of them). The logo from the product pages is automatically taken from the shop page. How can I change the logo in product pages while keeping the logo in the shop page? Thanks! Link to comment
0 bangank36 Posted November 12, 2020 Share Posted November 12, 2020 2 hours ago, Alpi87 said: Site URL: https://www.murmali.com/shop/cork-bucket-gamma-natural Hi there! I am trying to change the logo in only my product pages (all of them). The logo from the product pages is automatically taken from the shop page. How can I change the logo in product pages while keeping the logo in the shop page? Thanks! There is class name in product page for body, if you want logo in black on shop just use this body.collection-type-products .Header-branding img { filter: invert(1); } Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for SquarespaceIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
0 Alpi87 Posted November 12, 2020 Author Share Posted November 12, 2020 (edited) Hi bangank36, thank you for your reply. I knew this already and it does the job. However, for some reason the effect of the filter in my white logo is not very good. In some desktop screens it appears thicker and kind of blurry. When I change the logo in the shop page to the black logo, in the product pages it appears perfect. That's why I need to change the logo and not just apply a filter on the one taken from the shop page. I know that with the following code I can change the logo in any page of the site (except for the product pages) <script> window.onload = function() { document.getElementsByClassName('Header-branding-logo')[0].src = 'URL'; } </script> However I do not know how to target just the logo in the product pages... Edited November 12, 2020 by Alpi87 spelling mistake bangank36 1 Link to comment
0 bangank36 Posted November 12, 2020 Share Posted November 12, 2020 <script> window.onload = function() { document.querySelector('body.collection-type-products .Header-branding-logo')[0].src = 'URL'; } </script> .collection-type-products is the class of product page body Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for SquarespaceIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
0 Alpi87 Posted November 12, 2020 Author Share Posted November 12, 2020 It does not work... I have tried targeting "body.collection-type-products .Header-branding-logo" and "body.collection-type-products .Header-branding img" and it still does not work. bangank36 1 Link to comment
0 bangank36 Posted November 12, 2020 Share Posted November 12, 2020 6 minutes ago, Alpi87 said: It does not work... I have tried targeting "body.collection-type-products .Header-branding-logo" and "body.collection-type-products .Header-branding img" and it still does not work. It's my bad <script> window.onload = function() { document.querySelector('body.collection-type-products .Header-branding-logo').src = 'URL'; } </script> Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for SquarespaceIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
0 Alpi87 Posted November 12, 2020 Author Share Posted November 12, 2020 When I put that code it changes the logo in all product pages but also in the shop page... Link to comment
0 bangank36 Posted November 12, 2020 Share Posted November 12, 2020 5 minutes ago, Alpi87 said: When I put that code it changes the logo in all product pages but also in the shop page... <script> window.onload = function() { var logo = document.querySelector('body.collection-type-products:not(#collection-5ebae83d182f400f38e71560) .Header-branding-logo'); if (logo) { logo.src = 'URL'; } } </script> This will exclude the shop, let me know, thanks Alpi87 1 Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for SquarespaceIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
0 Alpi87 Posted November 12, 2020 Author Share Posted November 12, 2020 OMG!! That worked perfectly! Thank you so much!🤓 tuanphan and bangank36 1 1 Link to comment
Question
Alpi87
Site URL: https://www.murmali.com/shop/cork-bucket-gamma-natural
Hi there! I am trying to change the logo in only my product pages (all of them). The logo from the product pages is automatically taken from the shop page. How can I change the logo in product pages while keeping the logo in the shop page?
Thanks!
Link to comment
Top Posters For This Question
5
4
Popular Days
Nov 12
9
Top Posters For This Question
Alpi87 5 posts
bangank36 4 posts
Popular Days
Nov 12 2020
9 posts
Popular Posts
Alpi87
OMG!! That worked perfectly! Thank you so much!🤓
Alpi87
Hi bangank36, thank you for your reply. I knew this already and it does the job. However, for some reason the effect of the filter in my white logo is not very good. In some desktop screens it appears
Alpi87
It does not work... I have tried targeting "body.collection-type-products .Header-branding-logo" and "body.collection-type-products .Header-branding img" and it still does not work.
Posted Images
8 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment