How to create a favicon for your blog
Wordpress Hacks March 20, 2009 1,962 viewsIn case you don’t know what a favicon is:
A favicon is a little 16×16 pixel graphic next to the address of your website. For my blog, it looks like this:
![]()
These icons can be real nice and label your site, so anybody will recognize it. There are a few sites out there that don’t use Gravatars in their blog, but Favatars that will display your favicon next to your comment. In the next steps you will learn how to create and display a favicon on your WordPress blog. And additionally I will show how you display it in your backend, since your favicon will not be displayed there by default.
Creating the Favicon
First of all, you should have a graphic that you want to have as your favicon. I will take this great Olga Kurylenko Fake:
- Open your favourite graphic editor. I prefer Fireworks, but MS Paint will do just fine.
- Cut out the most appealing part – yes, that is her face – in a regular square.
- Resize that picture to 16×16 pixels and it will become:
or
or 
- Save the 16×16 pixel picture as
favicon.bmp - Close your editor.
We will now have to convert this into a .ico file. To do this, we will use Irfanview.
- Open Irfanview.
- Open the
favicon.bmpfile. - Then click File > Save as and choose
.icoas filetype.

- Now you have your own
favicon.ico! Congrats!
How to display your Favicon on your Blog
In the next steps we will set your theme ready for your favicon and upload the stuff.
- Go to the place on your harddisk where you have saved the
favicon.icofile to. Click it with your right mouse button and choose copy. - Now go to your theme folder on your harddisk and into the
imagesfolder. Click your right mouse button again and choose paste. - Go back to the theme main folder open the
header.php1 - Search for
</head>and put in the following code just before it:
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/favicon.ico" type="image/x-icon" /> - Save your
header.phpand close the editor. - The final step is to upload the new
header.phpand thefavicon.icoin the images folder from your harddisk to your webspace.
How to display your Favicon in your Administration Area (Optional)
Unfortunately WordPress doesn’t take over your favicon for the backend, so you have to set it up manually with this WordPress Hack:
- Go to your WordPress root folder2.
- Open
wp-admin/admin-header.phpin your editor and search for</head>. - Just before the
</head>part you put in:
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/favicon.ico" type="image/x-icon" /> - Save the
admin-header.phpand upload it to your webspace in thewp-adminfolder.
The WordPress Administration area now will also display your favicon.
- preferrably with an html editor like Dreamweaver, but Editor will do just fine. [↩]
- the one that shows
wp-admin,wp-content,wp-login.php, etc. [↩]
Trackback? If you liked this article, subscribe for more updates.
Fink Tank
Freebies
Games
Hate
Love
WP Hacks
TV

March 23, 2009 at 06:05
Hey,fink.
Why the title is “you blog” but not “your blog”?
In my opinion, you should save the image as a favicon.png by FW, not bmp. Because the bmp can’t be transparence.
Do you think so?
[Reply]
Fink Reply:
March 24th, 2009 at 08:47
Yeah, you’re right. It has to be youR blog. I’ve just corrected it. The transparency can be set in Irfanview by checking keep transparency. So it will be ok to save it as a .bmp
[Reply]
May 20, 2009 at 06:50
Thank you Fink for such a wonderful post like this, and now I can display my Favicon on my blog and your step by step tips really a great help.
[Reply]
May 22, 2009 at 05:04
nice post thxx
[Reply]
June 17, 2009 at 06:30
Informative post indeed, Fink. I’ve a tune-up that might help; you can always display the ‘faveicon’ of your blog eitheir in the admin area or for the regular visitor via this code in the header.php file:
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">The idea hear is that you place the ‘faveicon’ file @ the root of your blog’s folder not the template. In this case, the call for the faveicon happens one time.
[Reply]
June 17, 2009 at 06:35
Sorry Flix, the comment system refused to place the whole code. You can delete the last 2 comments because they are duplicated.
Simply, replace the value of bloginfo(‘template_directory’) with this one bloginfo(‘url’) and place the faveicon in the root of the blog. In this case, WordPress will read it either you are in the admin area or the frontpage.
[Reply]
Fink Reply:
June 17th, 2009 at 04:44
Thanks for the additional information, Hicham
[Reply]
June 26, 2009 at 01:36
try it~
[Reply]