<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site may use a
 * different template.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package peccular
 */
get_header(); ?>
 <?php //$image = wp_get_attachment_url( get_post_thumbnail_id($post->ID));?>
 <?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( wc_get_page_id( 'shop' ) ), 'full' );?>
<div class="peccular-page-main"> 
  
 <header class="page-main-header3">
        <div class="container">
  <div class="row">       
         

  <div class="col-md-4 col-sm-4 col-xs-4 site-details">

        <?php  if(get_theme_mod('page_title_on_off') != 'on' ){     ?>   
        
        <h1 class="ht-main-title wow zoomIn"><?php woocommerce_page_title(); ?></h1>        
   
        <?php } ?> 
 <?php
    if(get_theme_mod('breadcrumb_on_off') != 'on' ){
  ?>
        <div class="breadcrumbbox <?php echo esc_attr(get_theme_mod('peccular_innerpage_header_box_onload_effects','wow zoomIn')); ?>" data-wow-duration="1s">
            
            <div class='button'><?php peccular_lite_the_breadcrumb(); ?></div>
                <!--  <?php //peccular_lite_the_breadcrumb(); ?> -->
            
        </div>
 <?php } ?>   
</div>
<!-- <div class="col-md-8 col-sm-8 col-xs-8 innheadimg">
<?php  //if(get_theme_mod('featured_img_on_off') != 'on' ){ ?>
 <?php  //if (!empty($thumb)) : ?>
     <img src="<?php //echo $thumb['0']; ?>"  class="ht-page-header-img" alt="<?php //the_title();?>" /> 
  <?php //endif ?> 
 <?php //} ?>             
</div> -->

    </div>
</header><!-- .entry-header --> 

<?php //do_action( 'woocommerce_archive_description' ); ?>
	<?php //do_action('woocommerce_before_main_content'); ?>
	<?php //if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
		<!-- <h1 class="page-title wow zoomIn"><?php //woocommerce_page_title(); ?></h1> -->
	<?php //endif; ?>	
</div>

	
<div class="single-productpage">
<main id="innerpage-box">
		<?php
			//if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
			//get_header('shop'); ?>
			<div id="page" class="container" >
				<div class="inner_contentbox" >
				<article id="content" class="article">

<?php if (get_theme_mod('peccular__shoppage_layout') == '1' ) { ?>
    <div class="row">
        <div class="col-lg-9 col-md-8 col-sm-8 col-xs-12">	
            <?php if ( have_posts() ) : ?>						
				<?php do_action( 'woocommerce_before_shop_loop' ); ?>
				<?php woocommerce_product_loop_start(); ?>
				<?php woocommerce_product_subcategories(); ?>
				<div class="row">
			<?php while ( have_posts() ) : the_post(); ?>
				<?php wc_get_template_part( 'content', 'product' ); ?>				
			<?php endwhile; // end of the loop. ?>
			</div>
				<?php woocommerce_product_loop_end(); ?>
				<?php do_action( 'woocommerce_after_shop_loop' ); ?>
				<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
				<?php //woocommerce_get_template( 'loop/no-products-found.php' ); ?>
			<?php endif; ?>		
        </div><!-- #main -->
        <div class="col-lg-3 col-md-4 col-sm-4 col-xs-12 product-page">
			<?php if( get_theme_mod('cd_button_display','show' ) == 'show') :
		  		?>
		  		<div class='button'><?php get_sidebar( 'peccular-shop-sidebar'); ?></div>
		  	<?php endif ?>
		</div>
	</div>

 <?php } else if (get_theme_mod('peccular__shoppage_layout') == '0' ) {?>
	<div class="row">
    	<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
    		
        <?php if ( have_posts() ) : ?>						
			<?php do_action( 'woocommerce_before_shop_loop' ); ?>
			<?php woocommerce_product_loop_start(); ?>
			<?php woocommerce_product_subcategories(); ?>
			
			<?php while ( have_posts() ) : the_post(); ?>
				<?php wc_get_template_part( 'content', 'product' ); ?>				
			<?php endwhile; // end of the loop. ?>
		
			<?php woocommerce_product_loop_end(); ?>
			<?php do_action( 'woocommerce_after_shop_loop' ); ?>
			<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
			<?php //woocommerce_get_template( 'loop/no-products-found.php' ); ?>
		<?php endif; ?>	
	
		 </div><!-- #main -->
		<!--  <div class="col-lg-3 col-md-4 col-sm-4 col-xs-12 product-page">
			<?php //if( get_theme_mod('cd_button_display','show' ) == 'show') :
		  		?>
		  		<div class='button'><?php //get_sidebar( 'peccular-shop-sidebar'); ?></div>
		  	<?php //endif ?>
		</div>	 -->

	</div>

<?php } if (get_theme_mod('peccular__shoppage_layout') == '2' ) { ?>
    <div class="row md-0">
		 <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12 product-page">
			<?php if( get_theme_mod('cd_button_display','show' ) == 'show') :
		  		?>
		  		<div class='button'><?php get_sidebar( 'peccular-shop-sidebar'); ?></div>
		  	<?php endif ?>
		</div>
       <div class="col-lg-9 col-md-8 col-sm-8 col-xs-12">	
            <?php if ( have_posts() ) : ?>						
			<?php do_action( 'woocommerce_before_shop_loop' ); ?>
			<?php woocommerce_product_loop_start(); ?>
			<?php woocommerce_product_subcategories(); ?>
			<div class="row">
			<?php while ( have_posts() ) : the_post(); ?>
				<?php wc_get_template_part( 'content', 'product' ); ?>				
			<?php endwhile; // end of the loop. ?>
			</div>
			<?php woocommerce_product_loop_end(); ?>
			<?php do_action( 'woocommerce_after_shop_loop' ); ?>
			<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
			<?php //woocommerce_get_template( 'loop/no-products-found.php' ); ?>
		<?php endif; ?>		
        </div><
    </div>
<?php } ?>
					<div class="clearfix"></div>
				</article>
				<?php /*do_action('woocommerce_sidebar');*/ ?>
				<?php //get_sidebar(); ?>	
				<div class="clearfix"></div>
			</div>
				<div class="clearfix"></div>
			</div>	
	</main><!-- #main -->
</div>
<?php get_footer(); ?>
