How to add a Favicon to WordPress

Web hosting, SEO, etc... related
Post Reply
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

How to add a Favicon to WordPress

Post by Saman » Sun May 06, 2012 3:02 pm

If there is already an old favicon.ico file in your current theme’s main folder, delete it using FTP Clients.
  1. With an FTP Client, upload the new favicon.ico file into your current theme’s main folder.
  2. Upload another copy of your favicon.ico file to the main directory of your site (ie. http://example.com/favicon.ico). This will display the favicon in your subscribers’ feedreaders.
In order for your favicon to show up in some older browsers, you will need to edit your page header.
  1. Go to your WordPress Administration Panel.
  2. Click on Design (called Presentation in WordPress 2.3.x and below, and Appearance in WordPress 2.7+).
  3. Click on Theme Editor.
  4. Select the file called Header or header.php to edit the file.
  5. Search for the line of code that begins with <link rel="shortcut icon" and ends with /favicon.ico" />. Overwrite it, if it exists, or add the following code below the <head> HTML tag.

Code: Select all

<link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico" />
Post Reply

Return to “Web Related”