Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- edit header.php, find this section:
- <?php
- // Check if this is a post or page, if it has a thumbnail, and if it's a big one
- if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
- has_post_thumbnail( $post->ID ) &&
- ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
- $image[1] >= HEADER_IMAGE_WIDTH ) :
- // Houston, we have a new header image!
- echo get_the_post_thumbnail( $post->ID );
- elseif ( get_header_image() ) : ?>
- <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
- <?php endif; ?>
- change to:
- <?php
- // Check if this is a post or page, if it has a thumbnail, and if it's a big one
- if ( is_front_page() && is_singular() && current_theme_supports( 'post-thumbnails' ) &&
- has_post_thumbnail( $post->ID ) &&
- ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
- $image[1] >= HEADER_IMAGE_WIDTH ) :
- // Houston, we have a new header image!
- echo get_the_post_thumbnail( $post->ID );
- elseif ( is_front_page() && get_header_image() ) : ?>
- <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement