From: Anthony Talarico Date: Thu, 31 Mar 2016 18:26:24 +0000 (-0400) Subject: adding conditional to add featured image to events from event page X-Git-Tag: v1.0.26^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=13f0a59c30b0fcb56925fb20d20424ae0312404e;p=WP-Themes%2Fsaultstemarie.git adding conditional to add featured image to events from event page --- diff --git a/functions.php b/functions.php index 425a9eb..327dca8 100644 --- a/functions.php +++ b/functions.php @@ -110,7 +110,11 @@ function glm_get_featured() { if (has_post_thumbnail($post_id) && (!(is_home()) ) && (!(is_single())) && (!(is_archive())) && (!(is_search()))) { $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), "full"); $imageUrl = ''; - } else { + } elseif(is_single() and is_post_type('ai1ec_event')){ + $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(123), "full"); + $imageUrl = ''; + } + else { $imageUrl = ''; } return $imageUrl;