wordpress snippets last updated   : January 29, 2015
we now have 646 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!