diff --git a/wp-content/themes/twentyfourteen/functions.php b/wp-content/themes/twentyfourteen/functions.php index 51e1b48e26..41f179a457 100644 --- a/wp-content/themes/twentyfourteen/functions.php +++ b/wp-content/themes/twentyfourteen/functions.php @@ -461,7 +461,7 @@ add_filter( 'body_class', 'twentyfourteen_body_classes' ); * @return array The filtered post class list. */ function twentyfourteen_post_classes( $classes ) { - if ( ! post_password_required() && has_post_thumbnail() ) { + if ( ! post_password_required() && ! is_attachment() && has_post_thumbnail() ) { $classes[] = 'has-post-thumbnail'; } diff --git a/wp-content/themes/twentyfourteen/inc/template-tags.php b/wp-content/themes/twentyfourteen/inc/template-tags.php index dee499e1e2..c911e2a186 100644 --- a/wp-content/themes/twentyfourteen/inc/template-tags.php +++ b/wp-content/themes/twentyfourteen/inc/template-tags.php @@ -175,7 +175,7 @@ add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); * @return void */ function twentyfourteen_post_thumbnail() { - if ( post_password_required() || ! has_post_thumbnail() ) { + if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; }