<?php
/**
 * The template for displaying all category 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 will use a
 * different template.
 *
 * @package hardware-dealer-pro
 */
// Top banner image start
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}
$single_product_col1="";
$single_product_col2="";
if(get_theme_mod('hardware-dealer-pro_products_single_page_sidebar',true)=='1')
{
	$single_product_col1="col-lg-8 col-md-12";
	$single_product_col2="col-lg-4 col-md-12";
}else
{
	$single_product_col1="col-lg-12 col-md-12";
	$single_product_col2="";
}
get_header(); 
$banner_img_backg = 'background-image:url(\''.esc_url(get_theme_mod('hardware_dealer_pro_banner_bgimages')).'\')';
?>

<!-- Top banner image start -->
<section class="banner-image archive-box-title mt-2" style="<?php echo esc_attr($banner_img_backg);?>" class="mt-5">
   <div class="container-fluid">
			<div class="single-product-banner-left">
				<h1 class="text-left"><?php echo get_the_title() ?></h1>
				<div class="mb-2 text-left">
					<span class="bradcrumbs">
						<?php woocommerce_breadcrumb(); ?>
					</span>
				</div>
			</div>
   </div>
</section>
<!-- Top banner image end -->


<div class="container">
	<?php the_archive_title( '<h1>', '</h1>' ); ?>
</div>
<div class="container">
    <div class="row">
		<div class="col-lg-8 col-md-8">
			<div class="row">
				<?php if ( have_posts() ) : ?>
	                <?php while ( have_posts() ) : the_post();
						get_template_part( 'template-parts/post/post-content' );
					endwhile; ?>
	            <?php else : ?>
	                <?php get_template_part( 'no-results', 'archive' ); ?>
	            <?php endif; ?>
	            <div class="navigation">
					<?php // Previous/next page navigation.
			            the_posts_pagination( array(
			                'prev_text'  => __( 'Previous page', 'hardware-dealer-pro' ),
			                'next_text'  => __( 'Next page', 'hardware-dealer-pro' ),
			                'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'hardware-dealer-pro' ) . ' </span>',
			            ));
					?>
				</div>
			</div>
        </div>
		<div id="efarm-pro-sidebar" class="col-lg-4 col-md-4">
			<?php get_sidebar( 'page' ); ?>
		</div>
        <div class="clearfix"></div>
    </div>
</div>
<?php get_footer(); ?>