<?php
/**
 * Template Name: EasySite Shop
 *
 * @package EasySite_Pro
 */

get_header();
?>

<div class="easysite-page-hero easysite-section">
	<div class="easysite-container">
		<h1><?php the_title(); ?></h1>
	</div>
</div>

<div class="easysite-container easysite-content-area">
	<?php while ( have_posts() ) : the_post(); ?>
		<div class="easysite-intro"><?php the_content(); ?></div>
	<?php endwhile; ?>

	<?php if ( easysite_wc_active() ) : ?>
		<section class="easysite-section easysite-featured-products">
			<h2><?php esc_html_e( 'Featured Products', 'easysite-pro' ); ?></h2>
			<?php echo do_shortcode( '[products limit="8" columns="4" orderby="date" order="DESC"]' ); ?>
		</section>
		<section class="easysite-section">
			<h2><?php esc_html_e( 'All Products', 'easysite-pro' ); ?></h2>
			<?php echo do_shortcode( '[products limit="12" paginate="true" columns="3"]' ); ?>
		</section>
	<?php else : ?>
		<p><?php esc_html_e( 'Install WooCommerce to display your shop. It is free and works with PayPal and Stripe.', 'easysite-pro' ); ?></p>
	<?php endif; ?>
</div>

<?php get_footer(); ?>
