<?php $clients = new WP_Query(array(
'post_type' => 'client',
'posts_per_page' => 12
)); ?>
<?php if ( $clients->have_posts() ) : ?>
<div class="testimonials">
<div class="container">
<h3><span>Пара Слов </span> Наших Клиентов</h3>
<div class="wmuSlider example1">
<div class="wmuSliderWrapper">
<?php $i = 0; ?>
<?php while ( $clients->have_posts() ) : $clients->the_post(); ?>
<?php $i++; ?>
<?php if($i == 1): ?>
<article style="position: absolute; width: 100%; opacity: 0;">
<?php endif; ?>
<div class="banner-wrap">
<div class="testimonials-grids">
<div class="col-md-6 testimonials-grid">
<?php the_content(); ?>
<div class="testimonials-grid-pos">
<div class="testimonials-grid-pos-left">
<?php the_post_thumbnail( 'clientimg', array('class' => 'img-responsive')) ?>
</div>
<div class="testimonials-grid-pos-right">
<h4><?php the_title(); ?></h4>
<p><?php the_field('work_client'); ?></p>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="clearfix"> </div>
</div>
</div>
<?php if($i == 2): ?>
</article>
<?php $i = 0; ?>
<?php endif; ?>
<?php endwhile; ?>
</div>
</div>
<?php wp_enqueue_script( 'jquery.wmuSlider', get_template_directory_uri() . '/js/jquery.wmuSlider.js'); ?>
<script>
jQuery(document).ready(function($){
$('.example1').wmuSlider();
});
</script>
</div>
</div>
<?php else: ?>
<!-- no posts found -->
<?php endif; ?>
<?php wp_reset_postdata(); ?>