* Portfolio single media template part * * @package Total WordPress theme * @subpackage Partials * @version 3.0.0 */ // Exit if accessed directly if (!defined('ABSPATH')) { exit; } // Get portfolio video $video = wpex_get_portfolio_post_video(); // Get portfolio attachment ( gallery images ) $attachments = wpex_get_gallery_ids(get_the_ID()); // Get portfolio thumbnail $thumbnail = !$video ? wpex_get_portfolio_post_thumbnail() : ''; ?> <div id="portfolio-single-media" class="clr"> <?php // Display slider if there are $attachments if ($attachments) { get_template_part('partials/portfolio/portfolio-single-gallery'); // Display Post Video if defined } elseif ($video) { ?> <?php echo $video; ?>
?> </div><!-- .wpex-slider-slide sp-slide --> <?php } ?> </div><!-- .wpex-slider-slides .sp-slides --> <div class="wpex-slider-thumbnails sp-thumbnails"> <?php // Loop through attachments foreach ($attachments as $attachment) { ?> <?php // Display image thumbnail wpex_get_portfolio_post_thumbnail(array('attachment' => $attachment, 'class' => 'wpex-slider-thumbnail sp-thumbnail', 'alt' => get_post_meta($attachments, '_wp_attachment_image_alt', true), 'schema_markup' => false)); ?> <?php } ?> </div><!-- .wpex-slider-thumbnails --> </div><!-- .wpex-slider .slider-pro --> </div><!-- #portfolio-single-gallery -->