One question that I’ve been struggling with over the last week is how to make the WordPress header image hyperlink back to the site itself. Many WordPress themes use the CSS background-image properly to display the header image. Unfortunately, there’s no direct way to modify the CSS style sheet to turn the image into a link.
However, there is a way to edit the header.php to do it.
Many themes will have a link that looks like this:
To make your header clickable, replace the above line in the header with this:
I have been looking for an easy to follow article on how to do this. Thanks for the article it has made my life a lot easier.
Cheers
Oh wow, thank you so much. Seriously useful, because I occasionally like to use my theme's header link to advertise bits of my site. Was getting annoyed at losing my index page.
I didn't have in my header.php, but I just plonked in that code at the bottom and it worked brilliantly.
Check out how it ended up here:
http://www.teasmaderevenge.com
Thanks again! Note to self: learn PHP.
Awesome tip, worked like a charm. I was looking all over for how to do this. Thank you.
Kevin.
Thanks, cpptrader -- yup, I forgot the pre tags. That'll teach me to post things when I should be in bed. :)
It could be my browser (I'm at work on old IE), but your post above just shows the images... did you maybe forget the pre tags? I'd love to see how to do this and appreciate you putting the time in!