Created
December 10, 2016 22:36
-
-
Save oneblackcrayon/bf894b4bb70744f6bb63604e126f5b8d to your computer and use it in GitHub Desktop.
WordPress: Add fav icons to <head>
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 | |
| /** | |
| * Adds fav icons to <head> | |
| * | |
| * @see https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head | |
| * @package ThemeName | |
| * @uses http://realfavicongenerator.net | |
| */ | |
| add_action( 'wp_head', 'child_theme_fav_icon_link' ); | |
| function child_theme_fav_icon_link() { ?> | |
| <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" /> | |
| <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" /> | |
| <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" /> | |
| <link rel="manifest" href="/manifest.json" /> | |
| <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" /> | |
| <meta name="apple-mobile-web-app-title" content="Site name" /> | |
| <meta name="application-name" content="Site name" /> | |
| <meta name="theme-color" content="#ffffff" /> | |
| <?php } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment