Last active
August 29, 2015 14:21
-
-
Save nickcernis/19e6ef933597ce65a4e1 to your computer and use it in GitHub Desktop.
Replace Genesis favicon with full favicon set
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 // Copy everything except for this first line | |
// Favicons generated by realfavicongenerator.net | |
// These should be added in wp-content/themes/child-theme/images/favicons/ | |
remove_action('wp_head', 'genesis_load_favicon'); | |
add_action('wp_head', 'custom_favicon'); | |
function custom_favicon(){ | |
?> | |
<link rel="icon" type="image/png" href="<?php bloginfo( 'stylesheet_directory' ) ?>/images/favicons/favicon-192x192.png" sizes="192x192"> | |
<link rel="icon" type="image/png" href="<?php bloginfo( 'stylesheet_directory' ) ?>/images/favicons/favicon-160x160.png" sizes="160x160"> | |
<link rel="icon" type="image/png" href="<?php bloginfo( 'stylesheet_directory' ) ?>/images/favicons/favicon-96x96.png" sizes="96x96"> | |
<link rel="icon" type="image/png" href="<?php bloginfo( 'stylesheet_directory' ) ?>/images/favicons/favicon-16x16.png" sizes="16x16"> | |
<link rel="icon" type="image/png" href="<?php bloginfo( 'stylesheet_directory' ) ?>/images/favicons/favicon-32x32.png" sizes="32x32"> | |
<meta name="msapplication-TileColor" content="#ffc40d"> | |
<meta name="msapplication-TileImage" content="/mstile-144x144.png"> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment