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

?>

<?php if($query->have_posts()):  ?>


<!--Services Section Two-->
<section class="services-section-two grey-bg">
	<div class="auto-container">
		<!--Sec Title-->
		<div class="sec-title grey-border">
			<h2><?php echo wp_kses_post($title)?></h2>
		</div>
		<div class="row clearfix">
		
			<?php 
				while($query->have_posts()): $query->the_post();
				 $services_meta = _WSH()->get_meta();
			     $flat_icon = buildark_set( $services_meta, 'fontawesome' );
				 $flat_icon = ( $flat_icon ) ? $flat_icon : 'flaticon-ruler';
                 global $post;
			?>
				<!--Services Block Four-->
				<div class="services-block-four col-lg-4 col-md-6 col-sm-6 col-xs-12">
					<div class="inner-box">
						<div class="content">
							<div class="icon-box">
								<span class="icon <?php echo esc_attr( $flat_icon );  ?>"></span>
							</div>
							<h3><a href="<?php echo esc_url( buildark_set($services_meta, ext_url )); ?>"><?php the_title(); ?></a></h3>
							<div class="text"><?php echo wp_trim_words( get_the_content(), $text_limit );  ?></div>
							<a class="read-more" href="<?php echo esc_url( buildark_set($services_meta, ext_url )); ?>"><?php esc_html_e( 'Read More', 'buildark' );  ?> <span class="arrow fa fa-angle-right"></span></a>
						</div>
					</div>
				</div>
				
			<?php endwhile; ?>

		</div>
	</div>
</section>
<!--End Services Section-->


<?php endif;

wp_reset_postdata();