Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Filter to add a custom favicon to your Genesis child theme.
* Add custom Genesis favicon
* Dude, replace the default Genesis favicon so you don't look like a n00b.
* Create your custom favicon.ico and place it in your child theme's directory.
* Add this code to your child theme's functions.php
* Images can be converted to the .ico format here:
* @author John Regan (
* @filter genesis_pre_load_favicon
* @uses get_stylesheet_directory_uri
* @param string Default Genesis favicon URL
* @return string Custom favicon URL
add_filter( 'genesis_pre_load_favicon', 'my_custom_favicon' );
function my_custom_favicon( $favicon_url ) {
return get_stylesheet_directory() . '/favicon.ico';
Copy link

anwerashif commented Nov 1, 2017

return get_stylesheet_directory_uri() . '/favicon.ico' ;

Hope, you will update soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment