Clickable Logo in Header in Thesis

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.

  1. First, upload your logo to the  /custom/images folder.
  2. Go to Thesis Options, and click “Header” under Display Options. Make sure “Show site name in header” is selected (it is by default).
  3. 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!

Bill Erickson

Bill Erickson is the co-founder and lead developer at CultivateWP, a WordPress agency focusing on high performance sites for web publishers.

About Me
Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk

Reader Interactions

Comments are closed. Continue the conversation with me on Twitter: @billerickson

Comments

  1. Mark Stevens says

    Won't this detract from a site's SEO? I'd prefer to be more creative with my header than the default text, but I don't want to discourage my page rank either.

  2. Mark Stevens says

    Ohh… that's what the -9999px text-indent is about, sliding the text out of view? And Google's not wise to that technique?

  3. ramesh says

    Thank you Bill. Your designs are really great and inspiring. And Thank you for sharing some really great thesis techniques.

  4. Moviemath says

    Internet Explorer likey this code, Firefox and Safari not likey… Cross browser compatible code available? 🙂

      • Moviemath says

        To redefine and clarify, yes it works – that is logo is clickable – but the clickable dimensions in Firefox and Safari have been reduced to the size and area of the header text only, not the dimensions of the logo, which oftentimes is larger if containing a tagline as part of the overall logo image file. Thanks for the quick reply earlier.

        • Bill Erickson says

          By making the height and width of .custom #logo a the same as the image, you will make the clickable area the size of the logo image file.