<?php global $qaleb;?>
<?php if($qaleb['slider-bottom-ac']=='1'){?>
<div class="slider-bottom">
<div class="title">
<h3><?php echo $qaleb['slider-bottom-title'];?></h3>
<?php if($qaleb['slider-bottom-ar']=='1'){?>
<a href="<?php echo $qaleb['slider-bottom-link']; ?>"><?php echo $qaleb['slider-bottom-ar-ti']; ?></a>
<?php } ?>
</div>
<div class="owl-carousel-2 owl-theme">
  <?php
			  
			  if($qaleb['slider-bottom-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-bottom-count'],
				);
			  }else if($qaleb['slider-bottom-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-bottom-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['slider-bottom-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-bottom-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['slider-bottom-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>	
<div class="item">
<div class="text">
<h2> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="boad"><?php if(get_meta('lead') != false) : echo get_meta('lead'); else : the_excerpt(); endif; ?></div>
</div>
<div class="clients-talk">
<div class="img-box">
<a href="<?php the_permalink(); ?>">
<?php if(has_post_thumbnail()){?>
<img class="img-fluid" src="<?php the_post_thumbnail_url('loop'); ?>" alt="<?php the_title(); ?>">
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
</a>										
</div>
<div class="info">
<?php if(get_post_meta( get_the_ID(), 'meta-text-3', true )!=null){ ?><b><?php echo get_post_meta( get_the_ID(), 'meta-text-3', true ); ?></b><?php } ?>
<span><?php the_time(' d F Y ');  ?></span>
</div>
</div>
</div>
<?php endwhile; endif; wp_reset_query(); ?>		  
</div></div>
          <script>
            $(document).ready(function() {
              var owl = $('.owl-carousel-2');
              owl.owlCarousel({
                rtl: true,
                margin: 20,
                nav: true,
                loop: true,
				autoplay:true,
                autoplayTimeout:5000,
                responsive: {
                  0: {
                    items: 1
                  },				  
                  650: {
                    items: 2
                  },				  				  				  
                  1300: {
                    items: 2
                  }
                }
              })
            })
          </script>	
<?php } ?>		  