<?php if(get_theme_mod('social_charity_testimonials_enable')):
  $social_charity_testimonial_title=  get_theme_mod( 'social_charity_tetimonials_text',__( 'What People Say', 'social-charity' ) );
  ?>
  <section class="testimonial testimonial-slider mgb-lg">
    <div class="container">
      <div class="main-title">
        <h2><?php echo esc_html($social_charity_testimonial_title);?></h2>
      </div>
      <div class="row">
        <?php
        $social_charity_i=1;
        for($social_charity_k=1;$social_charity_k<7;$social_charity_k++){
          $social_charity_testimonial[$i] = get_theme_mod('social_charity_testimonial_page_'.$social_charity_k);    
          $social_charity_testimonialposition[$i] = get_theme_mod('social_charity_testimonial_position_'.$social_charity_k);
          $social_charity_i=$social_charity_i+1;     
        }
        $social_charity_args = array (
          'post_type' => 'page',
          'posts_per_page' => $social_charity_i,
          'post__in'      => $social_charity_testimonial,
          'orderby'        =>'post__in',
        );
        $social_charity_testimonialloop = new WP_Query($social_charity_args);
        $social_charity_k=1;
        if ($social_charity_testimonialloop->have_posts()) :  while ($social_charity_testimonialloop->have_posts()) : $social_charity_testimonialloop->the_post();?>
          <div class="col-sm-4">
            <div class="t-thumb">
              <div class="img">
                <?php if(has_post_thumbnail()): ?>
                  <?php the_post_thumbnail('social-charity-testimonials-image'); ?> 
                <?php endif; ?>
              </div>
              <div class="t-body">
                <div class="t-title">
                  <h6><?php the_title();?></h6>
                  <p><?php echo esc_html($social_charity_testimonialposition[$k]); ?></p>
                </div>
                <p><img src="<?php echo esc_url(get_template_directory_uri());?>/assets/images/quote.png" class="quote" alt=""><?php the_excerpt();?></p>
              </div>
            </div>
          </div>
          <?php  $social_charity_k=$social_charity_k+1; endwhile;
          endif; 
           wp_reset_postdata(); 
          ?>
      </div>
    </div>
  </section>
  <?php endif;?>