Example #1
0
/**
 * Staff single media template part
 *
 * @package Total WordPress theme
 * @subpackage Partials
 * @version 3.0.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Get portfolio attachment ( gallery images )
$attachments = wpex_get_gallery_ids(get_the_ID());
// Get portfolio thumbnail
$thumbnail = wpex_get_staff_post_thumbnail();
if ($attachments || $thumbnail) {
    ?>

	<div id="staff-single-media" class="clr">
		<?php 
    if ($attachments) {
        ?>
			<?php 
        get_template_part('partials/staff/staff-single-gallery');
        ?>
		<?php 
    } elseif ($thumbnail) {
        ?>
			 <?php 
        // Load lightbox styles
Example #2
0
    ?>

				</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_staff_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><!-- .gallery-format-post-slider -->