wordpress snippets last updated   : September 29, 2014
we now have 639 snippets

Insert favicon with function

wordpress snippet

Adding this PHP code to your functions.php of your wordpress theme will insert the HTML for your favicon.

snippet :  PHPcopy
function myfavicon() {
	echo '<link rel="Shortcut Icon" type="image/x-icon" href="'.get_bloginfo('wpurl').'/favicon.ico" />';
}
add_action('wp_head', 'myfavicon');

Did you like this post? If so please share it with your friends. Thanks!