Adding a favicon to wordpress.

After looking at my 404 statistics and noticing the huge number of failed requests for a favicon.ico file I thought I should add one!

I added the favicon (the little graphic before the url in the bar at the top of the screen) to my site by:-

  • Importing the desired picture into the favicon.cc site, although you can design an icon on the site too.
  • Upload the generated favicon.ico file to the wordpress themes/nigarila folder.
  • Then added this line to the file header.php: <link rel=”shortcut icon” href=”<?php bloginfo(‘template_directory’); ?>/favicon.ico” /> just before the </head> tag.

Hopefully that will stay working! Many thanks to the WordPress help site for the code.

Be the first to like.