wordpress-theme-boilerplate
wordpress-theme-boilerplate copied to clipboard
Make store front page template
I think we should make a archive-product.php have a conditional for a template-store-front-page.php file. Something like this:
<?php if( is_shop() ) : ?>
<?php get_template_part('template-store-front-page'); ?>
<?php else : ?>
<div id="content" class="shop">
<?php get_template_part('store/part-product-filters'); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php wc_get_template_part( 'content', 'product' ); ?>
<?php endwhile; ?>
<?php else: ?>
<div class="fallback">
<p>There are no products within the current filter.</p>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
Or perhaps we make it work like page.php with a switch statement.