How to display a custom favicon on Genesis Child Theme
Today I am going to share how do you can change your website favicon which is appeared by Genesis Child Theme on WordPress. Genesis Framework or Genesis Child Theme bare default favicon icon with G written on a black circle. There is an ico formated file in images folder of your child theme directory. Just changed it with 16x16 resolution favicon.ico.
Here is the code to add in your functions.php file.
Here is the code to add in your functions.php file.
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Display a custom favicon | |
add_filter( 'genesis_pre_load_favicon', 'sp_favicon_filter' ); | |
function sp_favicon_filter( $favicon_url ) { | |
return 'http://www.mydomain.com/wp-content/themes/genesis/images/favicon.ico'; | |
} |