From 13f0a59c30b0fcb56925fb20d20424ae0312404e Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 31 Mar 2016 14:26:24 -0400 Subject: [PATCH] adding conditional to add featured image to events from event page --- functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.17.1