Support » Themes and Templates » Make header image link to another page

  • Resolved bigchezmktg


    I’m trying to help a friend. She wants the header image (the white one with her logo in it) to link to her home page.

    The wordpress site in question is:

    I’ve googled all over the place and the options I’m getting seem convoluted.

    Is there an easy way to do this?

    Thanks in advance so much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • <div id="topheader">
    <div id="ftp">[...]</div>
    <div id="logo">
    <a href=""></a>
    <div id="nav">[...]</div>

    You’ll need to throw in something like the above – a new div with a link. Style it using CSS… the dimensions of the following are wrong but you can measure it to be what you need and tweak it to place it correctly:

    #logo a {
        display: block;
        height: 150px;
        width: 300px;
        float: left;

    This may not be semantic but should work.

    In your theme’s style.css file, replace:

    <div id=”header”>


    <div id=”header” class=”fix” onclick=”location.href=’’;” style=”cursor: pointer;”>

    The entire header including image will become the link. Sometimes this can be a good solution….just looked at the site, it should be fine.

    Sorry, leave out the ‘class=”fix”‘, that’s just from my site… 🙂

    Hi bigchezmtkg

    Just replying to your message on my post about custom header image issue. I have to say I am new to WordPress & it has taken me a little while to get the right coding to add my image header (in place of header text) and get it clickable. I sorted the clickable bit with code in my header.php so I guess you need to edit that to get yours clickable as a link to the relevant homepage.

    Here is the relevant part of my header.php code that makes the image clickable. If you do something similar in your header.php you should get it working!

    <div id="header">
        <a href="<?php bloginfo('url'); ?>">
      <img src="" alt="<?php bloginfo('name'); ?>" />
       <br /><br /><br /><br />
    	<p class="description">
    <?php bloginfo('description'); ?></p>
    </div><!--end header-->

    I hope this helps you (if it does or doesn’t(!?) I would appreciate your feedback!). Goodluck and best wishes

    I wound up using the code Anne sent. I had to tweak it a bit (the two headers are separate pix – not my code, btw) but once I adjusted the height, I was good to go!

    Thanks so much everyone! I really appreciate all your help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Make header image link to another page’ is closed to new replies.