<?php 

$services_per_page = $instance['services_per_page'];


$button_text = $instance['button_text'];



?>	


<section class="testimonial px-50 ">
            <div class="container-fluid pb-50 ">
                <div class="sec-title sec-title--two text-center mb-60">
                    <span class="xb-item--subtitle"><?php echo esc_html( $instance['subtitle'] ); ?></span>
                    <h2 class="xb-item--title" data-cursor="-opaque"><?php echo esc_html( $instance['title'] ); ?> </h2>
                </div>
                <div class="mh-testimonial-slider swiper-container">
                    <div class="swiper-wrapper">
					
					
					<?php
          
            $qargs = array(
                'post_status'       => 'publish',
                'post_type'         => 'services',
				'order'				=> 'ASC',
                'posts_per_page'    => $services_per_page
            );
            $postCount = 0;
            $recentPosts = new WP_Query( $qargs );
         
            if ( $recentPosts->have_posts() ) : ?>

                <?php while( $recentPosts->have_posts() ) : $recentPosts->the_post();
                $meta = get_post_meta( get_the_ID() ); 

$image_thumb = '';
								$services_ID = get_the_ID();
	if(has_post_thumbnail(get_the_ID(), ''))
	{
	    $image_id = get_post_thumbnail_id(get_the_ID());
	    $image_thumb = wp_get_attachment_image_src($image_id, '', true);
	}
	?>
					
                        <div class="swiper-slide">
                            <div class="mh-testimonial-item">
							
                                <div class="xb-item--image bg_img" data-cursor="-opaque">
								<img src="<?php echo $image_thumb[0]; ?>"></div>
                                <div class="xb-item--content">
                                    <h3 class="xb-item--name"><a href="<?php echo get_permalink( ); ?>"></a><?php the_title(); ?></h3>
                                    <!-- <p class="xb-item--desc">A therapy that helps you change negative..</p> -->
                                </div>
                                <div class="xb-item--video">
                                    <a href="<?php echo get_permalink( ); ?>" class="buttonview xb-element-parallax">
                                       View More
                                    </a>
                                </div>
                            </div>
                        </div>
                        
                        <?php endwhile;  endif; 
            wp_reset_postdata();  ?>
                        
                        
                        
                      
                    </div>
                </div>
				
			
            </div>
        </section>