Last active
December 10, 2015 23:48
-
-
Save deckerweb/4511610 to your computer and use it in GitHub Desktop.
Favicon for Frontend and Backend for Genesis powered websites --- place into "functions.php" of child theme or into a functionality plugin:
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 | |
| add_filter( 'genesis_favicon_url', 'ddw_custom_favicon_frontend' ); | |
| /** | |
| * (1) Favicon for Frontend | |
| * | |
| * @author David Decker | |
| * @link http://twitter.com/deckerweb | |
| */ | |
| function ddw_custom_favicon_frontend() { | |
| return get_stylesheet_directory_uri() . '/images/favicon.ico'; | |
| } | |
| add_action( 'admin_head', 'ddw_custom_favicon_backend_login' ); | |
| add_action( 'login_head', 'ddw_custom_favicon_backend_login' ); | |
| /** | |
| * (2) Favicon for WP-Admin & Login | |
| * | |
| * @author David Decker | |
| * @link http://twitter.com/deckerweb | |
| */ | |
| function ddw_custom_favicon_backend_login() { | |
| echo '<link rel="Shortcut Icon" type="image/x-icon" href="' . get_stylesheet_directory_uri() . '/images/favicon_backend.ico" type="image/x-icon" />'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment