<?php if ( get_theme_mod('laundry_cleaner_testimonial_section_enable',false) ) : ?>

<?php $laundry_cleaner_left_args = array(
  'post_type' => 'post',
  'post_status' => 'publish',
  'category_name' =>  get_theme_mod('laundry_cleaner_testimonial_category'),
  'posts_per_page' => get_theme_mod('laundry_cleaner_testimonial_number'),
);

?>
	<div id="trending" class="py-5">
		<div class="container">
			<div class="text-center">
				<?php if ( get_theme_mod('laundry_cleaner_testimonial_short_heading') ) : ?>
	    		<p class="mb-2 heading_short"><?php echo esc_html(get_theme_mod('laundry_cleaner_testimonial_short_heading'));?></p>
	    	<?php endif; ?>
				<?php if ( get_theme_mod('laundry_cleaner_testimonial_heading') ) : ?>
	    		<h2 class="mb-5"><?php echo esc_html(get_theme_mod('laundry_cleaner_testimonial_heading'));?></h2>
	    	<?php endif; ?>
	    </div>
  		<div class="owl-carousel">
				<?php $laundry_cleaner_arr_posts = new WP_Query( $laundry_cleaner_left_args );
					$i=1;
			    if ( $laundry_cleaner_arr_posts->have_posts() ) :
		      while ( $laundry_cleaner_arr_posts->have_posts() ) :
	        $laundry_cleaner_arr_posts->the_post(); ?>
	        <div class="trending_post mb-3">
	        	<p class="mb-5 client_box"><i class="fas fa-quote-left"></i>
	        		<?php echo wp_trim_words(get_the_content(), 20); ?></p>
	        	<div class="row">
	        		<div class="col-xl-1 col-lg-12 col-md-1 col-12">
	        		</div>
	        		<div class="col-xl-3 col-lg-4 col-md-3 col-4 align-self-center">
	        			<div class="trending_image">
		              <?php
				            if ( has_post_thumbnail() ) :
				              the_post_thumbnail();
				            else:
				              ?>
				              <div class="slider-alternate">
				                <img src="<?php echo get_stylesheet_directory_uri() . '/assets/images/banner.png'; ?>">
				              </div>
				              <?php
				            endif;
				          ?>
								</div>
	        		</div>
	        		<div class="col-xl-8 col-lg-9 col-md-8 col-8 align-self-center">
        				<h3><a href="<?php echo esc_url(get_permalink($post->ID)); ?>"><?php the_title(); ?></a></h3>
        				<?php if ( get_theme_mod('laundry_cleaner_testimonial_designation'.$i) ) : ?>
    							<p class="mb-0"><?php echo esc_html(get_theme_mod('laundry_cleaner_testimonial_designation'.$i));?></p>
	    					<?php endif; ?>
	        		</div>
	        	</div>
        	</div>
		    <?php
		    $i++;
		    endwhile;
		    wp_reset_postdata();
		    endif; ?>
			</div>
		</div>
	</div>
<?php endif; ?>