<?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()):  ?>


<!--Featured Section-->
<section class="featured-section">
	<div class="auto-container">
		<div class="outer-container">
			<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';
					 $subtitle = buildark_set( $services_meta, 'subtitle' );
					 global $post;
				?>
			
					<!--Featured Block-->
					<div class="featured-block col-lg-3 col-md-4 col-sm-6 col-xs-12">
						<div class="inner-box">
							<div class="image">
								<?php the_post_thumbnail( 'buildark_277x180', array( 'class' => 'img-responsive' ) );  ?>
							</div>
							<div class="lower-content">
								<div class="icon-box"><span class="icon <?php echo esc_attr( $flat_icon ); ?>"></span></div>
								<h3><a href="<?php echo esc_url( $read_more_link ); ?>"><?php the_title(); ?></a></h3>
								<div class="title"><?php echo wp_kses_post( $subtitle ); ?></div>
								<div class="text"><?php echo wp_trim_words( get_the_content(), $text_limit ); ?></div>
							</div>
						</div>
					</div>

			
				<?php endwhile; ?>

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


<?php endif;

wp_reset_postdata();