Today’s post is a quick one – add a custom favicon to your Thesis blog. A favicon is the little image you see in the url bar on some sites and also appears next to your site name when people bookmark your site. A good favicon can reenforce your brand and make it easy for people to find your website amongst a long list of others.
The code below will set your site’s favicon to the .ico file named “favicon” located in you /custom/images folder.
function custom_favicon() { ?>
<link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/custom/images/favicon.ico" />
<?php }
add_action('wp_head', 'custom_favicon');
For best results, use a .ico file that’s 16px by 16px. If you don’t already have that file, you can use the Dynamic Drive.com Favicon Maker.
{ 3 comments… read them below or add one }
Uhm How come ur favicon doesn’t show here??
I’m not using one. I haven’t come up with a design that I like enough to use yet. Good catch though.
Thanks Adam. Of several guys claiming to have the answer for doing this for Thesis I found that your method is the only one that worked for me. Champion!
Because I don’t play around with code much, the only thing I would have added if I’d written the instruction is where to add the code. For 1.7, from the Thesis dropdown choose Custom File Editor, open custom_functions.php, click Edit selected file, paste code after the last line of code, then save.