Last active
May 7, 2017 18:52
-
-
Save SErr0r/8c688b86a209456721ccbd3b505022d2 to your computer and use it in GitHub Desktop.
Adding a favicon to your site (including at the root)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function emw_add_favicon () { | |
echo '<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="'.get_stylesheet_directory_uri().'/assets/images/favicon.ico">'."\r\n"; | |
echo '<link rel="icon" type="image/vnd.microsoft.icon" href="'.get_stylesheet_directory_uri().'/assets/images/imgfavicon.ico">'."\r\n"; // Shouldn't be necessary, but added for maximum browser compatibility | |
} | |
add_action('wp_head', 'emw_add_favicon'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment