Add Favicon To Site

Fundamental 50 views
0
0 Flares 0 Flares ×

Add this to your functions.php file in your theme folder. This is an alternative way to adding a favicon rather then directly placing in the header.php file.

<?php
// add a favicon to your site
function so_add_favicon() {
	echo '<link rel="shortcut icon" href="' . get_stylesheet_directory_uri() . '/images/favicon.ico" />';
}
add_action('wp_head', 'so_add_favicon');
Provided by: Piet Bos
Tagged with:
Posted in Wordpress

Discuss:

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

No Trackbacks.

Login

Register | Lost your password?
0 Flares Twitter 0 Facebook 0 Google+ 0 0 Flares ×