Add Custom Favicon To Your WordPress Blog

A favicon (short for ‘favorites icon’), are little icons associated with a particular website shown next to the site’s name in the URL bar of most browsers. This will also appear in the tabs of the browser which makes your website easy to notice.

If your website has a custom favicon and you don't want to change the theme favicon then you can create a hook to add an action into the head tag.

The below snippet will add a link tag with the website URL plus the favicon link, just add this to the functions.php

// add a favicon to your
function blog_favicon() {
     echo '<link rel="Shortcut Icon" type="image/x-icon" href="'.get_bloginfo('url').'/favicon.ico" />';
add_action('wp_head', 'blog_favicon');
Back to top ^

Join Paulund

  • Get access to 100s of premium tutorials and downloadable content
  • Members content consists of Premium WordPress plugins, CSS packages, jQuery packages, tutorial demo files and templates for 100s of web development tutorials
  • In-depth development tutorials
  • Priority tutorial requests
  • Priority email development support
  • No ads

Here at Paulund you'll find Web Development tutorials and snippets focusing mainly on PHP, WordPress and CSS. Members will get access to premium tutorials that go into more detail about development with these languages. You will also get access to downloadable premium content based on the tutorial.

Join Paulund

Leave a Reply

Your email address will not be published. Required fields are marked *