From 01ad399aea2ba30b4b7769a9650a80c302e7b440 Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Tue, 14 Oct 2014 16:18:50 +0300 Subject: [PATCH] make the sponsors clickable, if they have a url --- functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions.php b/functions.php index 81d9360..be925d2 100644 --- a/functions.php +++ b/functions.php @@ -73,11 +73,19 @@ function sponsors_shortcode() { if ( $sponsors->have_posts() ) : while ( $sponsors->have_posts() ) : $sponsors->the_post(); + $custom = get_post_custom(); + if (!empty ($custom['url'])) { + echo ''; + } if ( has_post_thumbnail() ) { the_post_thumbnail(); } else { get_the_title(); } + if (!empty ($custom['url'])) { + echo ''; + } + endwhile; endif;