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> If you're looking for a Squarespace Developer, drop me a line. 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 If you're looking for a Squarespace Developer, drop me a line. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.