<?php global $qaleb;?>
<div class="wi_n wi_n_five a-5 clearfix">
<div class="ttit"><h3><?php echo $qaleb['a-5-title']; ?></h3>
<div class="contrl">
<span class="button-next">
<svg width="14px" height="24px" viewBox="-2 -2 14 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<polyline stroke="#999" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none" points="0 0 10 10 0 20"></polyline>
</svg>
</span>
<span class="button-prev">
<svg width="14px" height="24px" viewBox="-2 -2 14 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<polyline stroke="#999" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none" points="10 0 0 10 10 20"></polyline>
</svg>
 </span>
</div>
</div>
<div class="polist">
<?php
			  
			  if($qaleb['a-5-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['a-5-count'],
				);
			  }else if($qaleb['a-5-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['a-5-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['a-5-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['a-5-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['a-5-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 } ?>
</div>
<div class="det">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>
</div>
 <?php endwhile; endif;  wp_reset_query(); ?>
</div>
</div>