<?php
/**
 * The template for displaying woocommerce.
 * @link https://codex.wordpress.org/Template_Hierarchy
 * @package evaWp
 */

get_header(); ?>
<div id="content" class="container">
	<div class="row">
		<div class="<?php echo esc_attr( evawp_is_sidebar_active() ? 'col-md-8 col-lg-12' : 'col-md-12' ); ?> content-wrapper">
			<main id="main" class="site-main ">
			<?php if ( have_posts() ): ?>
				<div class="row" id="load-more">
					<?php woocommerce_content(); ?>							
				</div>
						
				<?php the_posts_pagination(
					array(
						'prev_text' => esc_html__( 'Previous', 'evawp' ),
						'next_text' => esc_html__( 'Next', 'evawp' ),
					)
				); ?>
				
			<?php else: ?>
				<?php
					# If no content, include the "No posts found" template.
					get_template_part( 'templates/content/content', 'none' );
				?>
			<?php endif; ?>				
			</main><!-- .site-main -->
		</div>
		<?php if( evawp_is_sidebar_active() ):?>
			<div class="col-md-4 col-lg-4 sidebar-wrapper">
				<?php get_sidebar(); ?>
			</div>
		<?php endif; ?>
	</div>
</div>
<?php get_footer(); ?>