wordpress-theme-boilerplate icon indicating copy to clipboard operation
wordpress-theme-boilerplate copied to clipboard

Make store front page template

Open drewbaker opened this issue 10 years ago • 0 comments

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.

drewbaker avatar Sep 08 '15 22:09 drewbaker