Optimizing woocommerce loop - thx @typeplus - See: https://github.com/holger1411/understrap/issues/69

This commit is contained in:
koenemann 2016-09-15 09:50:21 +02:00
parent 6a5d848fe8
commit 0c23350cae
1 changed files with 10 additions and 1 deletions

View File

@ -21,7 +21,16 @@ get_header(); ?>
<main id="main" class="site-main" role="main"> <main id="main" class="site-main" role="main">
<!-- The WooCommerce loop --> <!-- The WooCommerce loop -->
<?php woocommerce_content(); ?>
<?php
if (is_singular('product')) {
woocommerce_content();
} else {
//For ANY product archive.
//Product taxonomy, product search or /shop landing page etc.
woocommerce_get_template('archive-product.php');
}
?>
</main><!-- #main --> </main><!-- #main -->