S
S
struhovv2020-06-24 16:34:08
WordPress
struhovv, 2020-06-24 16:34:08

How to make separate template for woocommerce catalog page?

Tell me how to create a separate template for the catalog page in wordpress.

Separated the output of categories and products as follows

<?php if ( is_product() ) : ?>
<?php get_template_part( 'woocommerce-product' ); ?>
<?php else: ?>
<?php get_template_part( 'woocommerce-category' ); ?>
<?php endif; ?>


Inside 'woocommerce-category' I placed the code of the standard archive-product.php.

What should I do if I have different layouts: on the main page only a list of categories without filters is displayed, inside the category there is a list of products and filters?

That is, there should be separate templates for the /catalog/ and /product-category/ pages

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question