Linking header image to home page

Hello,

I’m using the free version of Sydney. I’ve set it up so that I use a single image as the header. I would like to be able to make this image link back to the homepage so that when a visitor is within a post or page he/she can simply click the header to go back to the homepage. Can you advise how one might do this?

Thank you.

Hello there,

In order to achieve that objective, could you please try to do the following steps:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box

;(function($) {

  'use strict'

  if ( $( '.header-image' ).length ) {
    var homeLink = $('.site-header .col-md-4 a').attr('href');
    $('.header-image').append('<a href="'+homeLink+'"><span class="screen-reader-text">Bak to Home</span></a>');
  }

})(jQuery);   

  1. Update

  2. Then apply the following CSS code through the Simple Custom CSS plugin or child theme’s style.css.

.header-image a{
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
}

Regards,
Kharis