From 6221d8d0a928fb8f056afc3c2c21f9ce1a0816a9 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Wed, 31 Dec 2014 11:00:15 -0500 Subject: [PATCH] change to get_the_ID instead of $post --- includes/class-displayfeaturedimagegenesis-common.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/class-displayfeaturedimagegenesis-common.php b/includes/class-displayfeaturedimagegenesis-common.php index 96532b5..2336fd2 100644 --- a/includes/class-displayfeaturedimagegenesis-common.php +++ b/includes/class-displayfeaturedimagegenesis-common.php @@ -31,10 +31,9 @@ class Display_Featured_Image_Genesis_Common { $displaysetting = get_option( 'displayfeaturedimagegenesis' ); $move_excerpts = $displaysetting['move_excerpts']; $postspage_image = get_post_thumbnail_id( $postspage ); - $post = get_post(); if ( is_singular() ) { // just checking for handling conditional variables set by width - $thumb_metadata = wp_get_attachment_metadata( get_post_thumbnail_id( $post->ID ) ); // needed only for the next line + $thumb_metadata = wp_get_attachment_metadata( get_post_thumbnail_id( get_the_ID() ) ); // needed only for the next line $width = ''; if ( $thumb_metadata ) { $width = $thumb_metadata['width']; @@ -70,7 +69,7 @@ class Display_Featured_Image_Genesis_Common { // any singular post/page/CPT with either a post_thumbnail larger than medium size OR there is no $item->fallback elseif ( is_singular() ) { if ( ( $width > $item->medium ) && ! in_array( get_post_type(), self::use_fallback_image() ) ) { - $image_id = get_post_thumbnail_id( $post->ID ); + $image_id = get_post_thumbnail_id( get_the_ID() ); } elseif ( ! has_post_thumbnail() || $width <= $item->medium ) { $taxonomies = get_taxonomies();