Support » Theme: Tonic » Making the header image a link to the home page

  • I’ve tried the solutions in this post, and neither of them is accomplishing what I’m trying to do, which is just turn to whole banner image into a clickable link back to the home page. What am I missing?

    Line 45 of my header.php looks like this
    <a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="path" alt="<?php bloginfo( 'name' ); ?>" /></a>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Post your site’s link for us to see.

    Right, sorry, forgot that.

    The site is:

    Currently there is a menu up in the header image, but it doesn’t really fit the look we’re going for, thus we were wanting to make the banner image the “home” link.

    Thanks for looking.

    You’re using a background image, so the solution mentioned in that post won’t work as the theme places line 45 a class named “remove”.

    There are two ways of doing it. First revert the changes you’ve made.

    Edit header.php and change line 31 from

    <div id="header-wrap" class="grid wfull">


    <div id="header-wrap" class="grid wfull" onclick="location.href='<?php echo esc_url( home_url() ); ?>'" style="cursor:pointer">

    The entire banner becomes clickable just as you wanted.
    Needs JavaScript enabled to work

    Edit header.php and place the following on line 62

    <a class="click-div" href="<?php echo esc_url( home_url() ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"></a>

    Then use the following CSS {
      height: 100%;
      position: absolute;
      text-decoration: none;
      width: 100%;

    Uses only CSS
    The region above and next to the menu aren’t clickable.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Making the header image a link to the home page’ is closed to new replies.