<?php global $qaleb;?>
<?php if($qaleb['featured-ac'] == '1'){ ?>
<div class="clearfix"></div>
<div class="main_featured">
<div class="container inn">
<div class="ap_slider">
<div class="item clearfix">
  <?php
			  
			  if($qaleb['featured-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => 5,
				);
			  }else if($qaleb['featured-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => 5,
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['featured-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => 5,
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['featured-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>	

<div class="thumbnail">
<?php if(has_post_thumbnail()){?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail_url('slider'); ?>" alt="<?php the_title(); ?>"></a>
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
<div class="det">
<?php if($qaleb['featured-dat'] == '1'){ ?><div class="met"><span class="cat"><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo wt_time_ago(); ?> قبل</span></div><?php } ?>
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>
 </div>
<?php endwhile; endif;  wp_reset_query(); ?>
</div>
<?php if($qaleb['featured-2-ac'] == '1'){ ?>
<div class="item clearfix">
<?php
			  
			  if($qaleb['featured-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => 5,
					'offset' => 5,
				);
			  }else if($qaleb['featured-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => 5,
					'offset' => 5,
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['featured-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => 5,
					'offset' => 5,
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['featured-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>	
<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 class="det">
<?php if($qaleb['featured-dat'] == '1'){ ?><div class="met"><span class="cat"><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo wt_time_ago(); ?> قبل</span></div><?php } ?>
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>
 </div>
<?php endwhile; endif;  wp_reset_query(); ?>	
</div>
<?php } ?>
</div>
</div>
</div>
<div class="clearfix"></div>
<?php } ?>