Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Register custom image size for Featured Hero image.
- add_image_size( 'featured-hero', 1910, 936, true );
- add_action( 'genesis_after_header', 'sk_featured_image' );
- /**
- * Display featured image (if present) below the header on single Post pages.
- */
- function sk_featured_image() {
- // if this is not a single post having a featured image, abort.
- if ( ! ( is_singular( 'post' ) && has_post_thumbnail() ) ) {
- return;
- }
- echo '<div class="featured-hero">';
- the_post_thumbnail( 'featured-hero' );
- echo '</div>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement