<?php global $qaleb;?>
<?php if($qaleb['slider-1-ac']=='1'){?>
<div class="ap_slider">
<div class="polist">
  <?php
			  
			  if($qaleb['slider-1-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-1-count'],
				);
			  }else if($qaleb['slider-1-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-1-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['slider-1-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-1-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['slider-1-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>	

<article class="item">
<div class="thumbnail">
<?php if(has_post_thumbnail()){?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail_url('loop-3'); ?>" alt="<?php the_title(); ?>"></a>
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
 </div>
<div class="det">
<?php if(get_post_meta( get_the_ID(), 'meta-text-1', true )!=null){ ?><div class="roti"><?php echo get_post_meta( get_the_ID(), 'meta-text-1', true ); ?></div><?php } ?>
<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
<?php if($qaleb['slider-1-d']=='1'){?><div class="time"><span class="ap-clock clock-d"></span><span><?php the_date('');  ?></span></div><?php } ?>
<p><?php if(get_meta('lead') != false) : echo get_meta('lead'); else : the_excerpt(); endif; ?></p>
</div>
</article>
 <?php endwhile; endif;  wp_reset_query(); ?>	
</div>
</div>
<?php if($qaleb['slider-1-n']=='1'){?><style>.ap_slider .polist .arrow.button-next,.ap_slider .polist .arrow.button-prev{display:none !important;}</style><?php } ?>
<?php } ?>