Posted on 31st January 2008No Responses
Coding Tip: Add a Favicon

1. Create your desired image 16x16px in an image editor and save it as a gif, jpg, png, or ico file, depending on which version your web host or blog provider supports. (WordPress uses favicon.ico).

2. Upload it into your root folder.

3. Insert this code between your <head></head> tags.

<link rel=”shortcut icon” href=”http://domain.com/favicon.ico” type=”image/x-icon”>
<link rel=”icon” href=”http://domain.com/favicon.ico” type=”image/x-icon”>

In WordPress, this would be your Header (header.php) file but you insert this code instead:

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

4. Save and reload. Your icon should appear next to your address bar now!

Comments
Leave a Response
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>