• Hello everyone.

    I’m currently setting up a website for a charity and i’m using TwentySixteen as the theme and SiteOrigin Pagebuilder and Custom css to handle the customization.

    My problem is that i want the logo to redirect anyone that clicks it to an external url (e.g google.com)and not to the website home page.

    Thanks for your time!

Viewing 3 replies - 1 through 3 (of 3 total)
  • go to editor of the theme from dashboard and open header.php and look line no.34 here you can see this

    <?php if ( is_front_page() && is_home() ) : ?>
    						<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    					<?php else : ?>
    						<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
    					<?php endif;

    just replace <?php echo esc_url( home_url( '/' ) ); ?> this area with your external url. example

    <?php if ( is_front_page() && is_home() ) : ?>
    						<h1 class="site-title"><a href="https://google.com" rel="external_url"><?php bloginfo( 'name' ); ?></a></h1>
    					<?php else : ?>
    						<p class="site-title"><a href="https://google.com" rel="external_url"><?php bloginfo( 'name' ); ?></a></p>
    					<?php endif;
    Thread Starter peterchris2313

    (@peterchris2313)

    @bubai Thanks for the reply but that didn’t work.I am not sure if the fact that i am using a child theme of TwentySixteen matters or not.I also
    checked the website with Firebug and the logo is inside a class called “custom-logo-link” here is the a tag of it

    <a itemprop="url" rel="home" class="custom-logo-link" href="the url of the website homepage">

    Since you’re using a child theme, you need to copy header.php from the parent theme’s folder to the child theme’s folder and then follow Bubai’s directions when you edit the copy that’s in the child theme’s folder. Also, can you post a link to your site?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change logo url in TwentySixteen’ is closed to new replies.