Change Site Title Link on Hompeage?
-
We’re customizing Twenty Seventeen for a landing page theme and would like the site title link on the homepage to do something else as right now it just reloads the homepage. This is default behavior as at https://2017.wordpress.net if you click “NEEDLE & HOOK” it just reloads the page. We want it to go to the Welcome, like when you click the down arrow in the bottom right of the homepage.
I can change this (in a child theme) as I found in template-parts\header\header.php the code:
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
can be:
<h1 class="site-title"><a href="#content"><?php bloginfo( 'name' ); ?></a></h1>
to get what I want, but I’m wondering if there is a better way I’m missing. It seems odd to me to have the main link just reload the homepage so I feel like that should be an option I’m just not finding.Thanks,
Andrew
- The topic ‘Change Site Title Link on Hompeage?’ is closed to new replies.