public
Last active

Load a custom favicon on your site using the Genesis Framework.

  • Download Gist
functions.php
PHP
1 2 3 4 5 6 7 8
<?php
//* Do NOT include the opening php tag
 
//* Load custom favicon
add_filter( 'genesis_pre_load_favicon', 'custom_favicon_filter' );
function custom_favicon_filter( $favicon_url ) {
return 'http://www.mydomain.com/wp-content/images/favicon.ico';
}

I kept having to update this for dev environments so now use...

return get_bloginfo('stylesheet_directory').'/images/favicon.png';

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.