Jump to content

Re-direting click through logo on LANGE templates

Recommended Posts

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
  • Replies 3
  • Views 456
  • Created
  • Last Reply

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

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

Archived

This topic is now archived and is closed to further replies.


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