Created
January 26, 2016 13:35
-
-
Save snapeuh/23bf290781c221903cbf to your computer and use it in GitHub Desktop.
WordPress mu-plugin to update favicon
This file contains 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 | |
/* | |
Plugin Name: Add Favicon | |
Description: Add Favicon | |
Author: Romain Etchegoyhen | |
*/ | |
add_action('wp_head', 'add_favicon'); | |
function add_favicon() { | |
$icon_url = get_template_directory_uri() . '/images/favicon.ico'; | |
echo '<link rel="shortcut icon" href="' . $icon_url . '">'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment