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.
Using a WordPress theme for a website comes with plenty of advantages. One great feature…
How can you link QR codes to digital content? When a QR code is read…
As a writer, or as a business owner doing some serious blogging, you probably wish…
Is WordPress Easy for Beginners? Yes, WordPress in all fairness is clean for novices to…
With time and innovation, WordPress has undergone a lot of changes and is now completely…
With the recession taking over the majority of economies across the globe, securing your job…
View Comments
The backstory on why it's traditionally a .ico (instead of .gif or .jpg) is actually pretty interesting - you can read up on it on this wikipedia entry:
http://en.wikipedia.org/wiki/Favicon
Ok, so maybe its only interesting to me :).
Peter´s last blog post..Creating User Friendly Custom Fields by Modifying the Post Page
Yeah, I've read it. Though with more browsers supporting it, I typically like to use transparent png's these days.
Thanks great post.
Is there a benefit to doing it this way, instead of just adding into the header.php?
No difference.
Moved from blogspot to wordpress and then was searchinhg for a way to add favicon to my blog then got here thnx.
How To Add Favicon To Your Blogspot Blog