<?php // LOGIC FOR FEATURE IMAGE / CAROUSEL / NONE //echo do_shortcode('[images_carousel fill="true"]' ); $terms = get_the_terms(get_the_id(), 'media-tags'); if ($terms && count($terms) > 0) { // we have a media tag attached. That means they want a carousel - get the images for that $term_array = array(); foreach ($terms as $term) { $term_array[] = $term->slug; } $atts = array('tag' => implode(',', $term_array), 'fill' => true); ?> <div id="carousel" class='carousel'> <?php echo display_attached_images_carousel($atts, false); ?> </div> <?php } elseif (has_post_thumbnail()) { // featured image ?> <div id="carousel" class='page-featured-image'> <?php echo responsive_image_thumbnail(null, 'panorama'); ?>
<?php // LOGIC FOR FEATURE IMAGE / CAROUSEL / NONE //echo do_shortcode('[images_carousel fill="true"]' ); $terms = get_the_terms(get_the_id(), 'media-tags'); if ($terms && count($terms) > 0) { // we have a media tag attached. That means they want a carousel - get the images for that $term_array = array(); foreach ($terms as $term) { $term_array[] = $term->slug; } $atts = array('tag' => implode(',', $term_array), 'fill' => false); ?> <div id="carousel" class='carousel'> <?php echo display_attached_images_carousel($atts, true); ?> </div> <?php } elseif (has_post_thumbnail()) { // featured image ?> <div id="carousel" class='page-featured-image'> <?php echo responsive_image_thumbnail(null, 'panorama'); ?>