<?php global $qaleb;?>
<div class="clearfix"></div>
<section class="apnews ne_one">
<div class="boxx">
<div class="tit">
<h4><span><?php echo $qaleb['a-10-title']; ?></span></h4>
</div>
<div class="polist clearfix">
<?php
				if($qaleb['a-10-content']=='1'){
				$gargs = array(
                    'post_type' => 'post',
					'posts_per_page' => $qaleb['a-10-count'],
				);
			  }else if($qaleb['a-10-content']=='2'){
				$gargs = array(
                    'post_type' => 'post',
					'posts_per_page' => $qaleb['a-10-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['a-10-content']=='3'){
				$gargs = array(
                    'post_type' => 'post',
					'posts_per_page' => $qaleb['a-10-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['a-10-type-select'],
                        ),
				    ),
				);
			  }

                query_posts($gargs);
			
            if(have_posts()) : while(have_posts()) : the_post(); ?>
<div class="item clearfix">
<?php if($qaleb['boxe-a'] == '1'){?><div class="datee"><span><?php the_time('d');  ?></span><b><?php the_time('F');  ?></b></div><?php } ?>
<div class="thumbnail">
<?php if(has_post_thumbnail()){?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail_url('loop-bar'); ?>" alt="<?php the_title(); ?>"></a>
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
</div>
<div class="det">
<div class="met">
<?php if(get_post_meta( get_the_ID(), 'meta-text-1', true )!=null){ ?><span class="cat"><?php echo get_post_meta( get_the_ID(), 'meta-text-1', true ); ?></span> <?php } ?>
</div>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<b><?php if(get_meta('lead') != false) : echo get_meta('lead'); else : the_excerpt(); endif; ?></b>
 </div>
</div>
<?php endwhile; endif; wp_reset_query(); ?>
</div></div>
</section>