Tip: Favicon Function
Written by Stefan Vervoort on April 3, 2009If you have a favicon you want to add to your WordPress powered blog, you can simply add a function to your functions.php file from inside your theme directory.
Here is the snippet:
<?php /** * FAVICON * @WPCult.com */ function my_favicon() { ?> <link rel="shortcut icon" href="<?php echo bloginfo("template_directory") ?>'/images/favicon.ico" /> <?php } add_action('wp_head', 'my_favicon'); ?>
Please note that you have to add a favicon in .ico format (or .gif / .png) and you have to upload that to your theme directory inside the /images/ folder. If you have located the favicon somewhere else, please do correct the href path.
Welcome to WP Toy
WP Toy is a site dedicated to WordPress. We focus on showing you beautiful blogs, showing you interesting WordPress resources and articles and most importantly, we want to teach you how we "Toy with WordPress".
The WordPress Community
Search the Archives
All About WordPress Resources
Do you love WordPress?
We are looking for bloggers passionated about WordPress. If you feel you are right for the job and can write 3/4 WordPress-related articles a week, we are looking for you!








