Adding favicon to Your WordPress Site

Want to add a favicon to your WordPress site? You’ll need to add a link tag to your head on your HTML page. The best way I found to do this was to edit your functions.php file and add the following code:

function favicon_link() {
  echo '<link rel="shortcut icon" type="image/png" href="/favicon.png" />' . "\n";
}
add_action('wp_head', 'favicon_link');

If you’re using a theme and don’t want to mess with it, fear not, create a child theme (See http://codex.wordpress.org/Child_Themes)!

See computer-realm.net