Jump to content

Change link of the logo (mobile and desktop)

Recommended Posts

25 minutes ago, MaBa00 said:

Hi,

the logo in my header should point to a page external to my website. I have tried to inject the following code:

<script> 
  document.querySelector('.logo-image a').setAttribute('href', '/https://www.google.com/');
</script>

but did not work. Can someone help me?

 

Add these code on Code Injection > Header Section.

<script src="https://code.jquery.com/jquery-3.6.3.min.js"></script>
<script>
$(function(){
   $('.header-title-logo a').attr("href", "https://www.google.com");
});
</script>

 

 

Edited by Web_Solutions

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment
  • 2 weeks later...
14 hours ago, MaBa00 said:

Thnaks for the answer but unfortunately doesn't work either

Can you share your website URL?

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

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.