How To: Add a favicon to wordpress

Well since I just did this I thought I should write about it! hopefully you can see it..

It’s pretty simple really:

1. Get yourself a favicon you want. It has to be 16×16 and called favicon.ico

2. Upload the file to your main site directory, ie

http://internubs.com/favicon.ico

as well as the main folder for the theme you are using, ie

http://internubs.com/wp-content/themes/lightword

as my theme is called lightword.

3. Go to the Header (header.php) template in the Appearance Editor in your WordPress admin, find the line that ends

/favicon.ico” />

and replace it with

<link rel=”shortcut icon” href=”<?php bloginfo(‘template_directory’); ?>/favicon.ico” />

4. Update the file, clear your browser cache and you’re good to go!

This worked for me, tested it on my laptop and showed up fine. Hope it works for you too!

2 thoughts on “How To: Add a favicon to wordpress”

Leave a Reply