WordPress Snippets at WPcustoms

Add your own favicon to the header

create a favicon and upload it to your site’s root folder.


/**
 * Snippet Name: Add your own favicon to the header
 * Snippet URL: http://www.wpcustoms.net/snippets/add-your-own-favicon/
 */
 
function wpc_favicon() { 
echo '<link rel="Shortcut Icon" type="image/x-icon" href="'.get_bloginfo('wpurl').'/favicon.ico" />'; 
} 
add_action('wp_head', 'wpc_favicon');