Overriding WooCommerce archive-product.php

, ,
Recently I was working on a WooCommerce project and was having problems customizing the Products Page, I can’t seem to override the archive-product.php. Later I found out that the problem is due to the function woocommerce_content() outputting the wrong page for archive content.

To get around it, replace

<?php woocommerce_content() ?>

in woocommerce.php with:

<?php if ( is_singular( 'product' ) ): ?>
<?php woocommerce_content(); ?>
<?php else: ?>
<?php woocommerce_get_template( 'archive-product.php' ); ?>
<?php endif; ?>


Related Post


Latest Post


Recent Posts Widget

Make sure to never miss a thing...

Get the latest news from the creative industry along with other creative goodies, conveniently delivered to social media.