federocolo Posted October 25, 2019 Share Posted October 25, 2019 Hello everyone! I am using LAnge template and have a cover age for my website (set as home page). Once I get into the actual website thoug I would like that, clicking on the site logo at the top, it would re-direct on a different page (not having to go back to cover page). Is there a way to do this? Thank a lot Federico Link to comment
colin.irwin Posted October 25, 2019 Share Posted October 25, 2019 Change /whatever to your desired url slug and then Insert the following into the footer injection point. <script> window.Squarespace.onInitialize(Y, function(){ var homelink = document.querySelector('.site-title a'); if (homelink) { homelink.setAttribute('href', '/whatever') } }); </script> I'm Colin Irwin aka silvabokis. I've been a Squarespace designer & developer since 2013. I remember when it was all wild prairies round these here parts. 🐃🤠 Advice I give on here is free, though I may sometimes post an affiliate link or promote something I've written. That reminds me.. ..you might want to check out my Squarespace template finder or have a look at my other Squarespace tips Speaking of tips, 💲I've got a tip jar that you're welcome to throw a few quid into if you think I've helped you. If you're looking for a Squarespace developer Book a chat or Drop me a line - first meeting is always free Link to comment
federocolo Posted October 25, 2019 Author Share Posted October 25, 2019 Thank you for your reply Colin, but it doesn't look to work yet..Also I was wondering why should I inject it in the footer section? Link to comment
colin.irwin Posted October 25, 2019 Share Posted October 25, 2019 The problem was that my code was trying to change site title rather than site logo link It should now be working The code is <script> window.Squarespace.onInitialize(Y, function(){ var homelink = document.querySelector('.logo-image a'); if (homelink) { homelink.setAttribute('href', '/projects') } }); </script> Note that you should not include the full url in your links. Instead use the part from the first '/' character. So /projects I'm Colin Irwin aka silvabokis. I've been a Squarespace designer & developer since 2013. I remember when it was all wild prairies round these here parts. 🐃🤠 Advice I give on here is free, though I may sometimes post an affiliate link or promote something I've written. That reminds me.. ..you might want to check out my Squarespace template finder or have a look at my other Squarespace tips Speaking of tips, 💲I've got a tip jar that you're welcome to throw a few quid into if you think I've helped you. If you're looking for a Squarespace developer Book a chat or Drop me a line - first meeting is always free Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.