<section id="slider-section" class="slider-area home-slider">
  <!-- <div class="slideinning"></div> -->
  <!-- start of hero --> 
  <section class="hero-slider hero-style">
    <div class="fresh_food_restaurantswiper-container">
        <div class="sltp">              
            <?php 
                if(!empty($aboutus_image)){
                    echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($aboutus_image).'"  />';
                }else{
                    echo '<img src="'.get_template_directory_uri().'/assets/images/slider_1.png" />';
                }
            ?>
        </div>
        <div class="R-chili">              
            <?php 
                if(!empty($aboutus_image)){
                    echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($aboutus_image).'"  />';
                }else{
                    echo '<img src="'.get_template_directory_uri().'/assets/images/slider_3.png" />';
                }
            ?>
        </div>
        <div class="R-miri">              
            <?php 
                if(!empty($aboutus_image)){
                    echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($aboutus_image).'"  />';
                }else{
                    echo '<img src="'.get_template_directory_uri().'/assets/images/slider_2.png" />';
                }
            ?>
        </div>
      <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/sliderimage.png';
          }

        ?>
        <div class="fresh_food_restaurantswiper-slide">
            <div class="fresh_food_restaurantslide-inner slide-bg-image">
              <div class="container">
                <div class="row mr-0"> 

                  <div class="conbx">
                    <div class="slidercontent">
                        <div class="slide-title">
                            <h2><?php the_title_attribute(); ?></h2>    
                        </div>     
                        <div class="slide-text"> 
                          <?php the_excerpt(); ?>
                        </div>
                        <div class="slide-btns">
                            <a class="contactus" href="<?php echo esc_url(get_theme_mod('slider_btnlink2', '#')); ?>">
                              <?php echo esc_html(get_theme_mod('slider_btntext1', 'PICK UP')); ?>
                            </a>
                            <a class="ReadMore" href="<?php echo esc_url(get_theme_mod('slider_btnlink1', '#')); ?>">
                              <?php echo esc_html(get_theme_mod('slider_btntext2', 'DELIVERY')); ?>
                            </a>
                        </div>
                    </div>
                  </div>
                  <div class="simgbx">
                    <div class="sliderimg">
                        <img class="slide-mainimg slidershape1" src="<?php echo esc_url($img); ?>" alt="<?php the_title_attribute(); ?>">
                    </div>
                  </div>
                </div>

              </div> 

            </div>
        </div>
        <?php endwhile;
           wp_reset_postdata(); ?>
        <?php } } ?>
        <div class="clear"></div> 

      </div>
       <!-- swipper controls -->
      <div class="fresh_food_restaurantswiper-pagination"></div>
      <div class="fresh_food_restaurantswiper-button-next">
        <i class="fa-solid fa-arrow-left"></i>
      </div>
      <div class="fresh_food_restaurantswiper-button-prev">
        <i class="fa-solid fa-arrow-left"></i>
      </div>
    </div>
  </section>
  <!-- end of hero slider -->
</section>


