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!
Christina Sng worked as a web developer, information architect, account executive, producer, technical writer, and usability consultant in the 10 years (that's 30 years in Internet time!) she brought bread home. She has since retired to raise her children but still spends most of her waking hours on the net, no thanks to Apple. Here are some of her adventures.