Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active December 28, 2015 16:59
Show Gist options
  • Save srikat/7532952 to your computer and use it in GitHub Desktop.
Save srikat/7532952 to your computer and use it in GitHub Desktop.
How to add Featured image below/above Post and Page titles in Executive Pro. http://sridharkatakam.com/add-featured-image-belowabove-post-page-titles-executive-pro/
//* Add new image size
add_image_size( 'singular', 680, 200, TRUE );
add_action ( 'genesis_entry_header', 'sk_featured_image_title_singular' );
function sk_featured_image_title_singular() {
if ( !is_singular() || !has_post_thumbnail() )
return;
echo '<div class="singular-thumbnail">';
genesis_image( array( 'size' => 'singular' ) );
echo '</div>';
}
.singular-thumbnail {
margin-bottom: 2rem;
}
.attachment-singular {
vertical-align: top;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment