<?php global $qaleb;?>
<div class="da" style="margin:<?php echo $qaleb['e-5-opt']; ?>px 0;background:<?php echo $qaleb['e-5-color']; ?>">
<div class="container">
<div class="wrapper">
<div class="wi_n wi_n_seven clearfix">
<div class="ttit">
<h3><?php echo $qaleb['e-5-title']; ?></h3>
<?php if($qaleb['e-5-ar']=='1'){?><span class="read-more" tooltip="آرشیو کامل" flow="right"><a href="<?php echo $qaleb['e-5-li']; ?>"><i class="fa fa-folder-open-o" aria-hidden="true"></i></a></span><?php } ?>
</div>
<div class="polist">
<?php
				if($qaleb['e-5-content']=='1'){
				$gargs = array(
                    'post_type' => 'post',
					'posts_per_page' => $qaleb['e-5-count'],
				);
			  }else if($qaleb['e-5-content']=='2'){
				$gargs = array(
                    'post_type' => 'post',
					'posts_per_page' => $qaleb['e-5-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['e-5-content']=='3'){
				$gargs = array(
                    'post_type' => 'post',
					'posts_per_page' => $qaleb['e-5-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['e-5-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>
</div>
</div></div>