Make WordPress Core

Ticket #39302: 39302.0.diff

File 39302.0.diff, 869 bytes (added by westonruter, 8 years ago)
  • src/wp-content/themes/twentyseventeen/header.php

    diff --git src/wp-content/themes/twentyseventeen/header.php src/wp-content/themes/twentyseventeen/header.php
    index 30d7d2a7c2..470aac6ba7 100644
     
    4242
    4343        <?php
    4444        // If a regular post or page, and not the front page, show the featured image.
    45         if ( has_post_thumbnail() && ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) ) :
     45        if ( ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) && has_post_thumbnail( get_queried_object_id() ) ) :
    4646                echo '<div class="single-featured-image-header">';
    47                 the_post_thumbnail( 'twentyseventeen-featured-image' );
     47                echo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' );
    4848                echo '</div><!-- .single-featured-image-header -->';
    4949        endif;
    5050        ?>