<section id="slider-section" class="slider-area home-slider ">
  <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','Box Width')) == 'Full Width'){ ?> container <?php }?>">
      <section class="hero-slider hero-style">
    <div class="slidesh"></div>
    <div class="sshape"></div>
    <div class="sshape2"></div>
    <div class="slidesh2"></div>
    <div class="swiper-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_signupbtntext = get_theme_mod('slider_signupbtntext','Sign Up');
          $slider_signupbtnlink = get_theme_mod('slider_signupbtnlink','#');
          $slider_learnmorebtntext = get_theme_mod('slider_learnmorebtntext','Learn More');
          $slider_learnmorebtnlink = get_theme_mod('slider_learnmorebtnlink','#');
        ?>
          <div class="swiper-slide">
            <div class="slide-inner slide-bg-image">
              <div class="col-md-12 pd-0">
                    <div class="threebox box<?php echo esc_attr( $p ) ?> <?php if($p % 3 == 0) { echo "last_column"; } ?>">       
                      <img  src="<?php echo $img; ?>" alt="<?php the_title(); ?>">
                       <div class="s-olay"></div>
                    </div>
                    <div class="slider-inner-box">
                        <div data-swiper-parallax="300" class="slide-title">
                          <h2><?php the_title(); ?></h2>   
                        </div>    
                        <div data-swiper-parallax="400" class="slide-text">
                          <p><?php the_excerpt(); ?></p>
                        </div>
                        <div data-swiper-parallax="500" class="slide-btns">
                          <a class="signup" href="<?php echo apply_filters('dancemaster_slider', $slider_signupbtnlink); ?>"><?php echo apply_filters('dancemaster_slider', $slider_signupbtntext); ?></a>

                          <a class="ReadMore" href="<?php echo apply_filters('dancemaster_slider', $slider_learnmorebtnlink); ?>"><?php echo apply_filters('dancemaster_slider', $slider_learnmorebtntext); ?></a>
                        </div>
                    </div>
                    <div class="clearfix"></div>
              </div>
            </div>          
          </div>
      
        <?php endwhile;
           wp_reset_postdata(); ?>
        <?php } } ?>
        <div class="clear"></div> 
      </div>
       <!-- swipper controls -->
        <div class="swiper-pagination"></div>
        <div class="swiper-button-next"></div>
        <div class="swiper-button-prev"></div>
    </div>
  </section>
  </div>
	<!-- start of hero -->

  <!-- end of hero slider -->
</section>

