fix image_id setting if no post thumbnail

This commit is contained in:
Robin Cornett
2015-01-08 13:24:54 -05:00
parent 45b04bafaf
commit 09793cd4a6
@@ -95,9 +95,11 @@ class Display_Featured_Image_Genesis_Common {
*/
$use_tax_image = apply_filters( 'display_featured_image_genesis_use_taxonomy', self::$post_types );
$image_id = get_post_thumbnail_id( get_the_ID() );
if ( has_post_thumbnail() ) {
$image_id = get_post_thumbnail_id( get_the_ID() );
}
if ( ! has_post_thumbnail() || $width <= $item->medium || in_array( get_post_type(), $use_tax_image ) ) {
elseif ( ! has_post_thumbnail() || $width <= $item->medium || in_array( get_post_type(), $use_tax_image ) ) {
$taxonomies = get_taxonomies();
$args = array( 'orderby' => 'count', 'order' => 'DESC' );
$terms = wp_get_object_terms( get_the_ID(), $taxonomies, $args );