Ejemplo n.º 1
0
?>

		<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
			<?php 
        $slideshow = new THB_Collection($thb_page_id, 'work_slide');
        $slideshow->setSlidesImagesClickable();
        $slideshow->setSize('large');
        ?>

			<div class="single-work-slideshow-container">
			<?php 
        if (count($slideshow->getSlides()) > 0) {
            ?>
				<?php 
            if (thb_get_featured_image($thb_page_id) != '') {
                $slideshow->addCoverSlide(get_post_thumbnail_id($thb_page_id));
            }
            thb_get_template_part('config/modules/core/slideshows/submodules/flexslider/templates/slideshow', array('slideshow' => $slideshow, 'meta' => array('flexslider_smoothHeight' => '1', 'slideshowHeight' => '0', 'flexslider_effects' => 'fade', 'transition_speed' => 0.25, 'delay' => 4), 'id' => 'thb-single-work-slideshow'));
            ?>
			<?php 
        } else {
            ?>
				<?php 
            thb_post_format_image_markup(array('full' => thb_get_post_thumbnail_src($thb_page_id, 'full'), 'scaled' => thb_get_post_thumbnail_src($thb_page_id, 'large-cropped')));
            ?>
			<?php 
        }
<?php

/**
 * Slides
 */
$slideshow = new THB_Collection($id, 'work_slide');
$slideshow->setSize('full');
if (thb_get_featured_image($id) != '') {
    $slideshow->addCoverSlide(get_post_thumbnail_id($id));
}
$slides = $slideshow->getSlides();
/**
 * Image size
 */
$image_size = $slideshow->getSize();
/**
 * Class
 */
$class = array('cycle-slideshow');
if (count($slides) > 1) {
    $class[] = 'w-cycle-nav';
}
?>

<?php 
if (count($slides) > 1) {
    ?>
	<a href="#" id="thb-slideshow_prev">
		<?php 
    echo __('Previous', 'thb_text_domain');
    ?>