<?php
/**
 * This file is responsible for the services section on front page.
 * @version:1.0
 */
?> 

<?php if ( true == get_theme_mod( 'servicesectiononoff', true ) ) : ?>
     <!--/#services Professional Builde start -->
      <section id="services" class="professional_builder row what_we_area">
         <div class="container">
            <div class="title wow fadeInUp pb-90">
               <h2><?php _e(get_theme_mod('homepage_services_title', __('our Services' , 'plumbing-lite'))); ?></h2>
            </div>
            <div class="row builder_all">
           <!-- #services-text start --> 
           <?php
            $my_theme_slide_option_value = get_theme_mod( 'homepage_services_');
            if(isset($my_theme_slide_option_value) && !empty($my_theme_slide_option_value)){
            foreach ( $my_theme_slide_option_value as $item ) : ?>
               <?php if ( ! wp_attachment_is_image( $item['service_image'] ) ){

                $img_ur = esc_url_raw($item['service_image']);

            } else {
                $img_ur = wp_get_attachment_url($item['service_image']);
            } ?> 
               <div class="col-md-4 col-sm-6 builder">
                  <div class="radius">
                     <img src="<?php echo ( $img_ur); ?>" alt="services images" class="services-images">
                  </div>
                  <h4><?php echo ($item['service_name']); ?></h4>
                  <p><?php echo ($item['service_description']); ?></p>
               </div>
            
            <?php endforeach; ?>
            <?php }?>
            <!-- #End services-text start -->  
            </div>
         </div>
      </section>
      <?php endif; ?>

<?php if ( true == get_theme_mod( 'aboutussectiononoff', true ) ) : ?>
      <!-- #About Us Area start -->
      
              
                <!--#about-text start --> 
                 <?php if(is_active_sidebar('about_widgets')) { ?>
                      <?php dynamic_sidebar('about_widgets'); ?>
                    <?php } ?>

      <!-- End About Us Area -->
<?php endif; ?>