Get my FREE ebook:
"SEO FOR BLOGS: The Ultimate Guide"
Limited Time Offer!

How To Add A Favicon To Your WordPress Blog (The Proper Way)

If you want your blog to appear professional and to be taken seriously by your peers, there is a number of basic steps you must take, including having your very own favicon. Of course, you could easily add a favicon by editing your header.php file and adding some code there, but it’s not really a clean way to do that.

To add a favicon to your WordPress blog the proper way, you should paste the following code in the functions.php file of your WordPress theme:

1
2
3
4
5
6
7
function dukeo_favicon() { ?>
	<link rel="shortcut icon" href="<?php echo bloginfo('stylesheet_directory') ?>/img/favicon.ico" />
<?php }
add_action('wp_head', 'dukeo_favicon');

Make sure you edit the url to the favicon file, for the favicon to be displayed properly.

Commenting Contest
If you enjoyed this article, Get email updates
(It's Free)
Sté Kerwer
Post written by: Sté Kerwer
Bonjour from France. My name is Stéphane Kerwer and Dukeo.com is my blog. I do most of the heavy lifting in here but from time to time, you may see some guest posts. If you wish to receive updates about Dukeo, subscribe to RSS Feed, follow Dukeo on twitter or become a fan on Facebook.
Comments are closed.
Comments on this post are currently closed.
arrow