Skip to content

Instantly share code, notes, and snippets.

@snapeuh
Created January 26, 2016 13:35
Show Gist options
  • Save snapeuh/23bf290781c221903cbf to your computer and use it in GitHub Desktop.
Save snapeuh/23bf290781c221903cbf to your computer and use it in GitHub Desktop.
WordPress mu-plugin to update favicon
<?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