Categories: Tips & Tricks

Adding a favicon to your site

Looking to add a favicon to you site?

Inside your WordPress theme’s functions file (functions.php) add the following to inside your PHP code.

/**
 * FAVICON
 * @WPCult.com
 */function my_favicon() { ?>
 <link rel="shortcut icon" href="<?php echo bloginfo("stylesheet_directory") ?>'/images/favicon.ico" />
<?php }

add_action('wp_head', 'my_favicon');

That’s it, just be sure to upload an icon image or a .gif/.png. Be sure to correct the target location id the file is located somewhere else.

Web Master

Hi, I am Miguel, I bought this site in 2009. So I now run or manage the site. Please visit my new website or follow me on twitter @W3i.

View Comments

Recent Posts

Sam Bauers on bbPress [video]

As mentioned in a previous post, I was able to record about 85% of the…

48 minutes ago

The actually release of WordPress 2.8 announced

The WordPress development blog has put a date on the release of 2.8, plus some…

13 hours ago

Ben Dunkle on designing icons for WordPress [video]

I know many people attendedWordCamp 2009, in fact I believe there were 700 plus attendees.…

2 days ago

Notes from WordCamp San Fransisco

Over view notes of San Francisco WordCamp 2009 by [insert creator]??

2 days ago

The state of the Press

I might like to start off by saying Happy Birthday WordPress. I don't have any…

3 days ago