<?php global $qaleb;?>
<?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?>
<div class="list">
<div class="thumbnail">
<?php if(has_post_thumbnail()){?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail_url('loop2'); ?>" alt="<?php the_title(); ?>"></a>
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
<a href="<?php the_permalink(); ?>" class="overlayy"><div class="textt"><i class="fa fa-file-text-o" aria-hidden="true"></i></div></a>
 </div>
<div class="det">
<?php if($qaleb['cat-rotitr']=='1'){?>
<?php if(get_post_meta( get_the_ID(), 'meta-text-1', true )!=null){ ?><div class="rotitr"><?php echo get_post_meta( get_the_ID(), 'meta-text-1', true ); ?></div><?php } ?>
<?php } ?>
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="lead"><?php if(get_meta('lead') != false) : echo get_meta('lead'); else : the_excerpt(); endif; ?></div>
<div class="daat">
<?php if($qaleb['cat-text']=='1'){?><li><i class="fa fa-file-text-o" aria-hidden="true"></i> کد مطلب : <?php the_ID();?></li><?php } ?>
<?php if($qaleb['cat-date']=='1'){?><li><i class="fa fa-clock-o" aria-hidden="true"></i> <?php the_time(' d F Y ');  ?><?php if($qaleb['cat-time']=='1'){?> - <?php the_time('G:i');  ?><?php } ?></li><?php } ?>
<?php if($qaleb['cat-views']=='1'){?><li><i class="fa fa-pie-chart" aria-hidden="true"></i> <?php echo getPostViews(get_the_ID()); ?></li><?php } ?>
</div>
</div>
</div>
  <?php endwhile;
				else:
				echo "<b>چیزی یافت نشد !</b>";
				 endif; ?>
<?php if (function_exists("pagination")){ pagination($additional_loop->max_num_pages); } ?>				 