<?php global $qaleb;?>
<?php if($qaleb['slider-b-ac']=='1'){?>
<div class="wi_n wi_n_three clearfix">
<?php if($qaleb['slider-b-t']=='1'){?>
<div class="ttit">
<h3><?php echo $qaleb['slider-b-title']; ?></h3>
<?php if($qaleb['slider-b-ar']=='1'){?><span class="read-more" tooltip="آرشیو کامل" flow="right"><a href="<?php echo $qaleb['slider-b-li']; ?>"><i class="fa fa-folder-open-o" aria-hidden="true"></i></a></span><?php } ?>
</div>
<?php } ?>
<div class="polist">
 <?php
			  
			  if($qaleb['slider-b-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-b-count'],
				);
			  }else if($qaleb['slider-b-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-b-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['slider-b-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-b-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['slider-b-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>	
<div class="item">
<div class="thumbnail">
<?php if(has_post_thumbnail()){?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail_url('loop-1'); ?>" alt="<?php the_title(); ?>"></a>
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
<?php get_template_part('inc/item/date'); ?>
</div>
<div class="det">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>
<?php get_template_part('inc/item/read_more'); ?>
</div>
<?php endwhile; endif;  wp_reset_query(); ?>	
</div>
</div>
<?php } ?>