<?php get_header(); ?>
<?php global $qaleb;?>
<?php if($qaleb['breadcrumb']=='1'){?>
<div class="container"><div class="breadcrumb">
<div class="breadcrumb-title">شما اینجا هستید : </div>
<ul><li><a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('title'); ?>">صفحه اصلی</a></li>
<li>برچسب زده شده با : <?php single_tag_title(); ?></li>
</li>
</ul></div></div><?php } ?>
<div class="container">
<div class="row" id="content">
<div class="col-md-10">
<div class="row" style="margin-bottom:20px;">
<div class="col-md-8 middl">
<?php if($qaleb['ads-index-menu']=='1'){?><div class="ads"><?php echo $qaleb['ads-index-menu-html'];?></div><?php } ?>
<section class="posts">
 <div class="box-header"><b><?php wp_title(""); ?></b></div>			
 <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?>
        <div class="post-item-excerpt clearfix">
        <div class="post-thumbnail medium">
            <a href="<?php the_permalink(); ?>">	
         <?php if(has_post_thumbnail()){?><img src="<?php the_post_thumbnail_url('img-145'); ?>" class="attachment-medium size-medium wp-post-image" alt="<?php the_title(); ?>"> <?php }else{ ?>
        <img src="<?php bloginfo("template_url"); ?>/img/none.png">
        <?php } ?>
				</a><span class="boxe-1-left-date"><?php the_time('d M Y'); ?></span>
        </div>
        <div class="post-excerpt">
		  <?php if(get_post_meta( get_the_ID(), 'meta-text-1', true )!=null){ ?> <small class="subtitle text-muted"><i class="fa fa-stop" aria-hidden="true"></i> <?php echo get_post_meta( get_the_ID(), 'meta-text-1', true ); ?></small> <?php } ?>
                <h3 class="post-title">
                <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
            </h3>
            <div class="post-excerpt-summary">
                <p><?php if(get_meta('lead') != false) : echo get_meta('lead'); else : the_excerpt(); endif; ?></p>
            </div>
        </div>
    </div>	
	
   <?php endwhile;
				else:
				echo "<b>چیزی یافت نشد !</b>";
				 endif; ?>
      </section>

<?php if (function_exists("pagination")){ pagination($additional_loop->max_num_pages); } ?> 
</div>
<div class="col-md-4 left">
<?php get_template_part('sidbar/left'); ?>
</div><!--/.col-md-4-->				
</div><!--/.row-->
</div><!--/.col-md-10-->
<div class="col-md-2 ads">
<section id="ads">
<?php get_template_part('sidbar/ads'); ?>	
</section>
</div>
</div><!--/.row#content-->
</div><!--/.container-->
<?php if($qaleb['sidcontrol']=='1'){?>
<script>
$(document).ready(function() {
$('.middl,.left,.row,.ads')
.theiaStickySidebar({
additionalMarginTop: 30
});
});
</script>
<?php } ?>
<?php get_footer(); ?>