<?php
   $query = $this->query_posts();
   if (!$query->found_posts){ return;}
   
   $classes = array();
   $classes[] = 'swiper-slider-wrapper gsc-campaign layout-carousel';
   $classes[] = $settings['style'];
   $classes[] = $settings['space_between'] < 15 ? 'margin-disable': '';
   $this->add_render_attribute('wrapper', 'class', $classes);
?>

<div <?php echo $this->get_render_attribute_string('wrapper'); ?>>
   <div class="swiper-content-inner">   
      <div class="init-carousel-swiper swiper" data-carousel="<?php echo $this->get_carousel_settings() ?>">
         <div class="swiper-wrapper">
            <?php
               global $post;
               while ( $query->have_posts() ) { 
                  $query->the_post();
                  echo '<div class="swiper-slide">';
                     $this->sominx_get_template_part('wpcftemplate/content', $settings['style'], array('thumbnail_size' => $settings['image_size']) );
                  echo '</div>';
               }
            ?>
         </div> 
      </div>
   </div>   
   <?php echo ($settings['ca_pagination'] ? '<div class="swiper-pagination"></div>' : '' ); ?>
   <?php echo ($settings['ca_navigation'] ? '<div class="swiper-nav-next"></div><div class="swiper-nav-prev"></div>' : '' ); ?>
</div>
