<?php if ( get_theme_mod('engineering_manufacturing_services_section_enable',false) ) : ?>

<div class="services py-5">
	<div class="container">
		<?php if ( get_theme_mod('engineering_manufacturing_services_heading') ) : ?>
			<h3 class="text-center pb-4 wow flip"><?php echo esc_html(get_theme_mod('engineering_manufacturing_services_heading')); ?></h3>
		<?php endif; ?>
		<?php $engineering_manufacturing_args = array(
			'post_type' => 'post',
			'post_status' => 'publish',
			'category_name' =>  get_theme_mod('engineering_manufacturing_services_category'),
			'posts_per_page' => 12,
		); ?>
		<div class="row">
	  	  	<?php $engineering_manufacturing_arr_posts = new WP_Query( $engineering_manufacturing_args );
		    	if ( $engineering_manufacturing_arr_posts->have_posts() ) :
		      	while ( $engineering_manufacturing_arr_posts->have_posts() ) :
		        $engineering_manufacturing_arr_posts->the_post();
		        ?>
		        <div class="col-lg-4 col-md-6 col-sm-6">
			        <div class="services_inner_box mb-4 wow zoomIn">
	    				<?php
				            if ( has_post_thumbnail() ) :
				              the_post_thumbnail();
				            else:
				              ?>
				              <div class="slider-alternate">
				                <img src="<?php echo get_stylesheet_directory_uri() . '/assets/images/banner.png'; ?>">
				              </div>
				              <?php
				            endif;
				          ?>
		    			<div class="services_content_box mt-3">
			        		<h4><?php the_title(); ?></h4>
			              	<p class=""><?php echo wp_trim_words( get_the_content(), 20 ); ?></p>
		              		<p class="mb-0 bold-txt">
		                		<a href="<?php echo esc_url(get_permalink($post->ID)); ?>"><?php esc_html_e('Read More','engineering-manufacturing'); ?></a>
		              		</p>
			            </div>
	        		</div>
			    </div>
		      	<?php
		    endwhile;
		    wp_reset_postdata();
		    endif; ?>
		</div>
	</div>
</div>

<?php endif; ?>
