PHP – WordPress – Add Favicon

The given PHP example helps you to set your favicon in WordPress.

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

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Comment

Your email address will not be published. Required fields are marked *