WordPress.org

Ready to get started?Download WordPress

Forums

Make Header Image a Link to Home (6 posts)

  1. Cathy Schreiber
    Member
    Posted 4 years ago #

    I've researched this question for days and have tried the various suggestions I've come across. Nothing seems to work to make my custom header image a link to "home".

    I'm using the default theme which I have modified with a custom header; I did not change image names, I just overwrote the Kubrick files with the new image (so the header image is still called kubrickheader.jpg, but it's my own custom image now - and the files are saved in a different directory from the default files).

    This is what I've put in the Footer file:

    <div id="header" role="banner">
    <div id="headerimg">
    <div id="headerimg" onclick="location.href='http://www.thetrufflekit.com/blog/';" style="cursor: pointer;"></div>
    </div>

    I've also tried copying this same code into the stylesheet under the header section, but nothing came of it.

    What am I missing? I would just like my customer header image to link back to the home page from all pages. The blog is http://www.TheTruffleKit.com/blog.

    Thanks for any help!

  2. figaro
    Member
    Posted 4 years ago #

    Take a look at the following videos...I think I cover that in the 3rd video, but it's been a while since I made them, so could be in the 2nd.

    http://educhalk.org/blog/?p=137

    By the way, nice job on the theme.

  3. esmi
    Forum Moderator
    Posted 4 years ago #

    I've also tried copying this same code into the stylesheet under the header section, but nothing came of it.

    Take that back out of the stylesheet if it's still in there. Markup doesn't work in CSS files and could stop your stylesheet from working altogether.

    Edit header.php and change:

    <div id="header" role="banner">
    <div id="headerimg">
    <div id="headerimg" style="cursor: pointer;" ;="" onclick="location.href='http://www.thetrufflekit.com/blog/'"/>
    </div>
    </div>

    to

    <div id="header" role="banner">
    <div id="headerimg" style="cursor: pointer;" ;="" onclick="location.href='http://www.thetrufflekit.com/blog/'"/>
    </div>
    </div>
  4. Cathy Schreiber
    Member
    Posted 4 years ago #

    Figaro,

    Your videos were very helpful! I looked at them several days ago, and you do cover the topic in the third video. That's where I got the code I used. For some reason, though, it hasn't worked for my blog. But, I did find your videos really useful and well done on several topics. Thanks for putting them together! Cathy

  5. esmi
    Forum Moderator
    Posted 4 years ago #

    You made a small - but critical - error when you copied that code into your header.

  6. Cathy Schreiber
    Member
    Posted 4 years ago #

    Esmi,

    Thanks for the suggestion - I tried it, but still no joy.

    I had also already removed the code from the stylesheet after I saw that it didn't work there.

    Thanks again,
    Cathy

Topic Closed

This topic has been closed to new replies.

About this Topic