<?php  
   $count = 1;
   $paged = get_query_var('paged');
   $query_args = array('post_type' => 'bunch_services' , 'showposts' => $num , 'order_by' => $sort , 'order' => $order, 'paged'=>$paged);
   if( $cat ) $query_args['services_category'] = $cat;
   $query = new WP_Query($query_args) ; 
   ?> 
<?php if($query->have_posts()):  ?>   

<!--Services Section-->
<section class="services-section services-page-section">
    <div class="auto-container">
        
        <div class="row clearfix">
            <?php while($query->have_posts()): $query->the_post();
				global $post ; 
				$service_meta = _WSH()->get_meta();
			?>
            <!--Services Block-->
            <div class="services-block col-lg-4 col-md-6 col-sm-6 col-xs-12">
                <div class="inner-box hvr-float">
                    <div class="image">
                        <?php the_post_thumbnail('manufacto_370x218'); ?>
                        <div class="icon-box">
                            <span class="icon <?php echo str_replace("icon ", "", manufacto_set($service_meta, 'fontawesome'));?>"></span>
                        </div>
                        <div class="overlay-box clearfix">
                            <div class="text"><?php echo wp_kses_post(manufacto_trim(get_the_content(), $text_limit)); ?></div>
                            <a href="<?php echo esc_url(manufacto_set($service_meta, 'ext_url')); ?>" class="read-more"><?php esc_html_e('Read More', 'manufacto'); ?></a>
                        </div>
                    </div>
                    <div class="lower-box">
                        <h3><a href="<?php echo esc_url(manufacto_set($service_meta, 'ext_url')); ?>"><?php the_title(); ?></a></h3>
                    </div>
                </div>
            </div>
            <?php endwhile;?>
        </div>
        
        <!--Styled Pagination-->
        <div class="styled-pagination">
            <div class="inner-container clearfix">
                
                <div class="clearfix text-center">
                    <?php manufacto_the_pagination(array('total'=>$query->max_num_pages, 'next_text' => '<div class="pull-right next-post">Next Post <i class="fa fa-long-arrow-right"></i> </div>', 'prev_text' => '<div class="pull-left prev-post"><i class="fa fa-long-arrow-left"></i> Prev Post </div>')); ?>
				</div>
                
            </div>
        </div>
    </div>
</section>
<!--End Services Section-->

<?php endif; wp_reset_postdata(); ?>