Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Last active December 10, 2015 23:48
Show Gist options
  • Select an option

  • Save deckerweb/4511610 to your computer and use it in GitHub Desktop.

Select an option

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:
<?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