Jump to content

Re: Changing the Link Adress of My Logo

Recommended Posts

This post was closed to additional comments, but I wanted to add a bit of info I discovered. I am also using a Brine family template and onewheels had a great suggestion for applying the change to the entire site by going to Home-->Settings-->Advanced-->Code Injection and inserting code to change the link behavior of the Site Title logo. I made a small change that makes the code more universal. Instead of the complete URL, I used the relative link "/home" which is the URL slug of my home page beyond the Cover Page. I did have a small snag because Squarespace uses all lowercase for URL slugs and I had originally used "/Home" which threw an error. Check the URL slug on the General Page Settings for your homepage and use that. Here is the code I injected:

<!-- point logo back to my "/home" URL slug -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!-- change the link on desktop -->  
$(document).ready(function () {document.getElementsByClassName('Header-branding')[0].href="/home";});
<!-- change the link on mobile devices -->  
$(document).ready(function () {document.getElementsByClassName('Mobile-bar-branding')[0].href="/home";});

Just replace the "/home" with whatever URL slug is on the page to which you want the logo click to return.

Thanks, onewheels, for the code!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • 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.