<?php
/*
Theme Designed By: S O R O U S H M A R K E T
Email: info@soroushmarket.ir
Demo Website: soroushmarket.ir
Author Website: soroushmarket.ir
*/
 get_header();?>
   <div role="complementary" class="col-lg-3 col-md-3 col-sm-12 hidden-sm hidden-xs side-bar">
   <?php get_template_part('right-sidebar'); ?>
   </div>
<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
   <?php if ( have_posts() ) : ?>
   <?php while ( have_posts() ) : the_post(); ?>

   <?php if ($data['view_type'] == 1) { ?>
   <div role="main" class="col-lg-6 col-md-6 col-sm-6 col-xs-12 pcon" id="post-<?php the_ID(); ?>">
      <div class="product">
        <div class="col-lg-4 col-md-5 col-sm-5 col-xs-12 prod-img fr-img">
            <?php if ( has_post_thumbnail()) :  ?>
            <a href="<?php the_permalink() ?>" class="vi-img-res-box post-img"><?php the_post_thumbnail( 'thumbnail' ); ?></a>
            <?php else: ?>
            <a href="<?php the_permalink() ?>" class="vi-img-res-box post-img"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/tumb.png" class="post-tumb"/></a>
            <?php endif; ?>
         </div>
         <div class="col-lg-8 col-md-7 col-sm-7 col-xs-12 prod-det">
            <div class="row post-name">
               <h2><?php the_title(); ?></h2>
            </div>
            <div class="row excerpt"><?php the_excerpt(); ?></div>
            <div class="post-links">
               <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                  <a href="<?php the_permalink() ?>" class="col-lg-6 col-md-7 col-sm-7 col-xs-12 pull-left btn btn-primary btn-sm prod-btn">
                  <span class="fa fa-list"></span>&nbsp;&nbsp;&nbsp;ادامه مطلب
                  </a>
               </div>
            </div>
         </div>
      </div>
   </div>
   <?php } else { ?>
   <div role="main" class="col-lg-4 col-md-4 col-sm-4 col-xs-12 pcon" id="post-<?php the_ID(); ?>">
      <div class="product">
         <div class="col-xs-12 prod-img fr-img">
            <?php if ( has_post_thumbnail()) :  ?>
            <a href="<?php the_permalink() ?>" class="vi-img-res-box post-img"><?php the_post_thumbnail( 'thumbnail' ); ?></a>
            <?php else: ?>
            <a href="<?php the_permalink() ?>" class="vi-img-res-box post-img"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/tumb.png" class="post-tumb"/></a>
            <?php endif; ?>
         </div>
         <div class="col-xs-12">
            <div class="col-xs-10 post-name pt-name">
               <h2 title="<?php the_title(); ?>"><?php the_title(); ?></h2>
            </div>
            <div class="prod-links col-xs-12">
               <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                  <a href="<?php the_permalink() ?>" class="col-lg-6 col-md-7 col-sm-7 col-xs-12 pull-left btn btn-primary btn-sm prod-btn">
                  <span class="fa fa-list"></span>&nbsp;&nbsp;&nbsp;ادامه مطلب
                  </a>
               </div>
            </div>
         </div>
      </div>
   </div>
   <?php } ?>
   <?php endwhile; ?>
   <div class="col-lg-12 pagination">
      <?php wp_pagination(); ?>
   </div>
   <?php else : ?>
   <div class="col-lg-12">
      <div class="alert alert-warning alert-dismissible anote" role="alert">
         <strong><span class="glyphicon glyphicon-bell" aria-hidden="true">
         </span> مطلبی پیدا نشد.</strong>
      </div>
   </div>
   <?php endif; ?>
</div>
</div>
 <?php if ($data['show_side_mobile'] == 1) { ?>
 <div role="complementary" class="col-lg-3 col-md-3 col-sm-12 visible-sm visible-xs side-bar">
   <?php get_template_part('right-sidebar'); ?>
 </div>
 <?php } ?>
</div>
<?php get_footer(); ?>