<div class="<?php if(esc_attr(get_theme_mod('slider_section_width','Full Width')) == 'Full Width'){ ?>container-fluid pd-0 <?php } elseif(esc_attr(get_theme_mod('slider_section_width','Full Width')) == 'Box Width'){ ?> container <?php }?>">

<section id="slider-section" class="slider-area home-slider">
  <!-- <div class="slideinning"></div> -->
  <!-- start of hero --> 
  <section class="hero-slider hero-style">
    <div class="carpenter_serviceswiper-container">
      <div class="swiper-wrapper">
        <?php for($p=1; $p<6; $p++) { ?>
        <?php if( get_theme_mod('slider'.$p,false)) { ?>
        <?php $querycolumns = new WP_query('page_id='.get_theme_mod('slider'.$p,true)); ?>
        <?php while( $querycolumns->have_posts() ) : $querycolumns->the_post(); 
          $image = wp_get_attachment_image_src(get_post_thumbnail_id() , true); ?>
        <?php 
          if(has_post_thumbnail()){
            $img = esc_url($image[0]);
          }
          if(empty($image)){
            $img = get_template_directory_uri().'/assets/images/default.png';
          }

        ?>
        <?php    
            $slider_btntext = esc_attr(get_theme_mod('slider_btntext','Read More'));
          ?>

        <div class="carpenter_serviceswiper-slide">
            <div class="carpenter_serviceslide-inner slide-bg-image">
                <!-- <div class="row md-0"> -->
                    <div class="sliderimg">
                      <img class="slide-mainimg slidershape1" src="<?php echo esc_url($img); ?>" alt="<?php the_title_attribute(); ?>">
                      <div class="s-oly"></div>
                      <div class="s-oly2"></div>
                      <div class="sliderinn-img"></div>
                    </div>
                    <div class="slidersvg2">              
                        <div class="slidercontent">
                            
                          <div class="slide-title">
                              <h2><?php the_title_attribute(); ?></h2>   
                              <!-- <hr> -->
                            </div>    
                            <div class="slide-text" >
                                <?php the_excerpt(); ?>
                            </div>
                          <div class="slide-btns">
                            <a class="ReadMore" href="<?php echo esc_url( get_permalink() ); ?>"><?php echo apply_filters('carpenterservice_slider', $slider_btntext); ?></a>
                          </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                  <!-- </div> -->
                <!-- </div> -->
            </div>
        </div>
        <?php endwhile;
           wp_reset_postdata(); ?>
        <?php } } ?>
        <div class="clear"></div> 

      </div>
       <!-- swipper controls -->
        <div class="carpenter_serviceswiper-pagination"></div>
        <div class="carpenter_serviceswiper-button-next"><i class="fa fa-caret-right"></i></div>
        <div class="carpenter_serviceswiper-button-prev"><i class="fa fa-caret-left"></i></div>
    </div>
  </section>
  <!-- end of hero slider -->
</section>

<div class="slider-banner">
    <div class="container">
      <div class="row">
          <div class="col-lg-9 col-md-9 col-sm-9 pd-0">
          <?php    
            $slider_slideraboutustext = esc_attr(get_theme_mod('slider_slideraboutustext','About Us'));
            $slider_slideraboutuslink = esc_attr(get_theme_mod('slider_slideraboutuslink','#'));
            $slider_bannertext = esc_attr(get_theme_mod('slider_bannertext','Describe your business can help slove the visitor problems'));

          ?>
              <p><?php echo apply_filters('carpenterservice_slider', $slider_bannertext); ?></p>
          </div>
          <div class="col-lg-3 col-md-3 col-sm-3">
              <div class="habtn">
                  <a class="btn" href="<?php echo apply_filters('carpenterservice_slider', $slider_slideraboutuslink); ?>"><?php echo apply_filters('carpenterservice_slider', $slider_slideraboutustext); ?></a>
              </div>
          </div>
      </div>
    </div>
</div>
</div>



