<?php global $qaleb;?>
<div class="wi_n wi_n_one clearfix">
<div class="ttit">
<h3><?php echo $qaleb['a-4-title']; ?></h3>
<?php if($qaleb['a-4-ar']=='1'){?><span class="read-more" tooltip="آرشیو کامل" flow="right"><a href="<?php echo $qaleb['a-4-li']; ?>"><i class="fa fa-folder-open-o" aria-hidden="true"></i></a></span><?php } ?>
</div>
<div class="polist">
<?php
				if($qaleb['a-4-content']=='1'){
				$gargs = array(
                    'post_type' => 'post',
					'posts_per_page' => $qaleb['a-4-count'],
				);
			  }else if($qaleb['a-4-content']=='2'){
				$gargs = array(
                    'post_type' => 'post',
					'posts_per_page' => $qaleb['a-4-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['a-4-content']=='3'){
				$gargs = array(
                    'post_type' => 'post',
					'posts_per_page' => $qaleb['a-4-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['a-4-type-select'],
                        ),
				    ),
				);
			  }

                query_posts($gargs);
			
            if(have_posts()) : while(have_posts()) : the_post(); ?>
<?php get_template_part('inc/loop/loop-2'); ?>			
<?php endwhile; endif; wp_reset_query(); ?>
</div>
</div>