This post has been marked as old. The code might no longer work. Comments have been disabled as this is no longer maintained. Use the search on the right to find a newer tutorial.
Update: As of Thesis 1.8, you can use the new Header Image option in the Thesis menu. In the admin area just go to Thesis > Header Image to upload your image. The way described below still works (and is what I do), but this new way will let you add a logo without editing code.
—
One of the most common modifications to the Thesis theme is replacing the header text with your own custom logo or image. What a lot of people forget to do is add a bit more code to make that logo clickable.
- First, upload your logo to the
/custom/images
folder. - Go to Thesis Options, and click “Header” under Display Options. Make sure “Show site name in header” is selected (it is by default).
- Open custom.css, and paste the following code. Make sure you change the height and width to match your logo’s dimensions:
.custom #logo {background-image: url('images/logo.jpg'); background-repeat: no-repeat; width: 170px; height: 145px; text-indent: -9999px; }
.custom #logo a {width: 170px; height: 145px; display: block; outline: none;}
That second line is what a lot of people forget. If you don’t include it, you’ll have the logo up there but it won’t be clickable. Now, when someone clicks it they are sent to the homepage.
And that’s it!
Moviemath says
My humble apologies good sir, on reinvestigation of my css .custom #logo a , I had inadvertently sourced my custom #logo code elsewhere… and not from your blog. To all those who visit here, the above code on this blog works as stated for all browsers and the entire image is clickable. Save this code and seek no further… haha. Cheers.
Joshua Dorkin says
Bill –
Perfect – just what the doctor ordered! This was very helpful. Thanks!
Petunia GreenBeans says
Woohoo!! The best. Works perfectly in every browser. Thank you SO MUCH for sharing your knowledge!!!
soferet says
Worked like a charm the first time! (I cannot code without breaking something.) Thank you!
Matt Crenshaw says
Thanks for the tutorial. Made for an easy fix. I haven’t done this on very many sites since I started using Thesis because I usually just text-indent: -9999px; and forget about display: block; which makes the link work.
I miss the old days when everything was hand coded but I guess Thesis is about as close to manual control as you can get, especially for being built on WP.
Btw, I’ve never really thought about it but someone mentioned it above: will this affect any onpage SEO I’ve got going? I’d hate to screw something up over a small convenience alteration like this.
Thanks again,
Matt
Bill Erickson says
I’m not an SEO guy so I can’t say for sure, but my guess is that this does not affect SEO. Almost every website uses an image for a logo rather than straight text, and I can’t see why Google would penalize it.
Adam Ring says
Hi Bill
Thanks for that code, good for the context of WordPress and Thesis. And, no, definitely no problem using this technique with Google. If one wanted one’s text indexed one would use a different technique such as a background graphic with cufoned text on top, or some such, but often one’s logo has to be all graphics because the text is too complex/difficult to render reliably. Google will treat your technique, as you say common, like it treats all graphics – which it is. Liked your bio too.
Cheers,
Adam Ring