Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

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


Vitto

Question

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

3 answers to this question

Recommended Posts

  • 0
Posted (edited)
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>
Edited by Agha_Waqas
Link to comment
  • 0

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

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care - Learn CSS - Custom Popup - Testimonial Slider

I'm Tuan, blogger/owner of a free library for children in Vietnam. Helping the community is a hobby. Contact me via email.

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