Jump to content

Code to change the page where you're directed to after clicking the site title/logo

Recommended Posts

Would this be the right code to change where clicking the header takes me to?

<div class="header-title-text">
  <a id="site-title"
     href="/home"!important>
  </a>
</div>

Right now clicking header on any page takes me to MySampleSite.com and I'd like for it to take me to MySampleSite.com/home instead.

Link to comment
  • Replies 3
  • Views 816
  • Created
  • Last Reply
41 minutes ago, Vitto said:

Would this be the right code to change where clicking the header takes me to?

<div class="header-title-text">
  <a id="site-title"
     href="/home"!important>
  </a>
</div>

Right now clicking header on any page takes me to MySampleSite.com and I'd like for it to take me to MySampleSite.com/home instead.

Hi. Paste below code into Code injection area. 
Setting > Advanced > Code injection > header
 

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

<script>$(document).ready(function () {
         $("#site-title").attr("href", "https://www.mysamplesite.com/home");
       });
</script>
Link to comment

Thank you for the reply Agha, sadly it didn't work. Maybe I didn't explain what I'm trying to change the right way. This is what I have in "Inspect" view <a id="site-title" href="/" data-animation-role="header-element">MY WEBSITE</a> and I'm trying to change it to this <a id="site-title" href="/home" data-animation-role="header-element">CADRE NOIR ART</a>.  Obviously "Inspect" is only temporary so I need the code for this change.

Link to comment
11 hours ago, Vitto said:

Thank you for the reply Agha, sadly it didn't work. Maybe I didn't explain what I'm trying to change the right way. This is what I have in "Inspect" view <a id="site-title" href="/" data-animation-role="header-element">MY WEBSITE</a> and I'm trying to change it to this <a id="site-title" href="/home" data-animation-role="header-element">CADRE NOIR ART</a>.  Obviously "Inspect" is only temporary so I need the code for this change.

You mean change both site title text + link? Can you share link to your site?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • Susana_SQSP changed the title to Code to change the page where you're directed to after clicking the site title/logo

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.