diff --git a/header.php b/header.php index bb653fdd4fea936e5c22c33835451a65712f72e3..e10390362bb9a02b7ca63a23c764cc955cd1f858 100644 --- a/header.php +++ b/header.php @@ -15,50 +15,51 @@ ?> class="no-js no-svg"> - - - + + + - + >
- + - - '; - echo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' ); - echo '
'; - endif; - ?> + /* + * If a regular post or page, and not the front page, show the featured image. + * Using get_queried_object_id() here since the $post global may not be set before a call to the_post(). + */ + if ((is_single() || (is_page() && !twentyseventeen_is_frontpage())) && has_post_thumbnail(get_queried_object_id())) : + echo ''; + endif; + ?> -
-
+
+