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

 

 

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

 

 

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.