How to replace my site name text with a logo image?

The title of this post is an oft repeated question I receive in my emails and in the comment section of this site. “How to change my site name to a logo?”.  For someone with few basic skills in html and css , this wont be a big deal. But I am hoping this will help those who want to do this but unable to figure it out. This also works out easy for me , so that I wont have to reply to those mails separately.  I have created a screencast which will show you the entire process.  However I am going to write down the steps involved.

1. Create and save your logo image to the images directory of your template. In this case we name it as logo.png

2. Open the header.php file of the template and find the section where your site name is given. It often looks like given below.

<h1><a href="<?php bloginfo('siteurl');?>/" title="<?php bloginfo('name');?>">
<?php bloginfo('name');?> </a></h1>

3. Change it to the following.

<h1><a href="<?php bloginfo('siteurl');?>/" title="<?php bloginfo('name');?>"> 
<img src="<?php bloginfo('stylesheet_directory');?>/images/logo.png"/> </a></h1>

Watch the screencast

  • uggs boots for women

    really good tutorial which can be used. this very interesting information

  • how do I do it on my blog http://dwijayasblog.blogspot.com/

  • I get it clear information about your topic.Above all the points are explained very clearly.

  • Flydeals

    You are a life saver. Check out how i did it: http://gr.flydeals.eu

  • Excellent review.i get it clear idea about your topic.All the points are explained very clearly.

  • Pirooz33

    Hi there.
    In this case you’ve mentioned, a big problem will be accords.By replace the contents of the <h1> tag, SEARCH ENGEENES couldn’t find your site through the site title.So it is better than to use this solution:<h1 style=”visibility:hidden;”></h1><div><img src=”logo.jpg” /></div>

  • Excellent review.i get it clear idea about your topic.

  • This is an excellent site

  • reading science fiction books is the stuff that i am always into. science fiction really widens my imagination-

  • Sweet  web site , super  style and design ,  actually  clean and use    pleasant.

  • Umerkakar

    Thanks it was so simple, and I stucked

  • I appreciate those simple steps you shared. It works for me! Thank you.

  • ABIT CORP

    really great post, thanks for sharing with us.

    ABIT CORP
    website designing company in Indore
    http://www.abitcorp.com