Changeset 39624
- Timestamp:
- 12/20/2016 10:59:28 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyseventeen/header.php
r38985 r39624 42 42 43 43 <?php 44 // 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() ) ) ) : 44 45 /* 46 * If a regular post or page, and not the front page, show the featured image. 47 * Using get_queried_object_id() here since the $post global may not be set before a call to the_post(). 48 */ 49 if ( ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) && has_post_thumbnail( get_queried_object_id() ) ) : 46 50 echo '<div class="single-featured-image-header">'; 47 the_post_thumbnail('twentyseventeen-featured-image' );51 echo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' ); 48 52 echo '</div><!-- .single-featured-image-header -->'; 49 53 endif;
Note: See TracChangeset
for help on using the changeset viewer.