Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Register a custom image size for Singular Featured images
- add_image_size( 'singular-featured-thumb', 800, 250, true );
- add_action( 'genesis_before_entry', 'sk_display_featured_image' );
- function sk_display_featured_image() {
- if ( ! is_singular( array( 'post', 'page' ) ) ) {
- return;
- }
- if ( ! has_post_thumbnail() ) {
- return;
- }
- // Display featured image above content
- echo '<div class="singular-featured-image">';
- genesis_image( array( 'size' => 'singular-featured-thumb' ) );
- echo '</div>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement