Last active
August 29, 2015 14:07
-
-
Save menslow/506ca7e50a6d0fb82aaf to your computer and use it in GitHub Desktop.
Genesis Filter for customizing favicons and Apple Touch icons
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 | |
// Filter for Genesis Parent theme to Customize favicon and add Apple Touch Icons | |
add_filter( 'genesis_pre_load_favicon', 'my_pre_load_favicon'); | |
function my_pre_load_favicon() { | |
echo '<link rel="shortcut icon" href="' . get_stylesheet_directory_uri() . '/lib/images/favicon.ico">'.PHP_EOL | |
.'<link rel="apple-touch-icon" href="touch-icon-iphone.png">'.PHP_EOL | |
.'<link rel="apple-touch-icon" sizes="76x76" href="' . get_stylesheet_directory_uri() . '/lib/images/logo-76.png">'.PHP_EOL | |
.'<link rel="apple-touch-icon" sizes="120x120" href="' . get_stylesheet_directory_uri() . '/lib/images/[email protected]">'.PHP_EOL | |
.'<link rel="apple-touch-icon" sizes="152x152" href="' . get_stylesheet_directory_uri() . '/lib/images/[email protected]">'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment