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

<?php $dentist_dental_care_left_args = array(
  'post_type' => 'post',
  'post_status' => 'publish',
  'category_name' =>  get_theme_mod('dentist_dental_care_what_we_do_left_category'),
  'posts_per_page' => get_theme_mod('dentist_dental_care_what_we_do_left_number'),
); ?>

	<div id="our_services" class="py-5">
		<div class="container">
			<div class="row">
				<div class="col-lg-6 col-md-6 align-self-center wow fadeInLeft">
					<?php if ( get_theme_mod('dentist_dental_care_what_we_do_heading') ) : ?>
		    		<h2 class="mb-0"><?php echo esc_html(get_theme_mod('dentist_dental_care_what_we_do_heading'));?></h2>
		    	<?php endif; ?>
		    </div>
				<div class="col-lg-6 col-md-6 align-self-center wow fadeInRight">
					<?php if ( get_theme_mod('dentist_dental_care_what_we_do_short_heading') ) : ?>
		    		<p class="mb-0"><?php echo esc_html(get_theme_mod('dentist_dental_care_what_we_do_short_heading'));?></p>
		    	<?php endif; ?>
		    </div>
    	</div>
			<div class="row mt-5">
				<?php $dentist_dental_care_arr_posts = new WP_Query( $dentist_dental_care_left_args );
			    if ( $dentist_dental_care_arr_posts->have_posts() ) :
			      while ( $dentist_dental_care_arr_posts->have_posts() ) :
			        $dentist_dental_care_arr_posts->the_post(); ?>
			        <div class="col-lg-4 col-md-6 col-sm-6">
								<div class="services-box wow zoomIn mb-4">
									<?php if( get_post_meta($post->ID, 'dentist_dental_care_icon', true) ) {?>
										<i class="<?php echo esc_attr(get_post_meta($post->ID,'dentist_dental_care_icon',true)); ?>"></i>
		    					<?php }?>
									<h3 class="mb-3"><?php the_title(); ?></h3>
									<p class="mb-0"><?php echo wp_trim_words( get_the_content(), 20 ); ?></p>
									<p class="slider-button mt-4">
              			<a href="<?php echo esc_url(get_permalink($post->ID)); ?>"><?php esc_html_e('Read More','dentist-dental-care'); ?></a>
            			</p>
								</div>
							</div>
			    <?php
			    endwhile;
			    wp_reset_postdata();
			    endif; ?>
			</div>
		</div>
	</div>
<?php endif; ?>
