Lego2012
12/14/2016 - 2:19 PM

Images

Images

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

<!-- Below is the code to add featured images to your site: -->

//* Add new featured image sizes
add_image_size( 'home-bottom', 150, 100, TRUE );
add_image_size( 'home-top', 400, 200, TRUE );

<!-- Below is the code to display a custom Gravatar on your site: -->

//* Display a custom Gravatar
add_filter( 'avatar_defaults', 'sp_gravatar' );
function sp_gravatar ($avatar) {
    $custom_avatar = get_stylesheet_directory_uri() . '/images/gravatar.png';
    $avatar[$custom_avatar] = "Custom Gravatar";
    return $avatar;
}

<!-- Below is the code to display a custom favicon on your site: -->

//* 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';
}

<!-- Sometimes it works better to replace the image directly in the theme’s images folder. Please see this step by step. -->

<!-- It can take a very long time for some browsers to clear the cached favicon. If you can load the favicon URL in a browser directly and see it changed, then the browser tab will eventually show the correct one. -->