Aziz Ozbek
WordPress Expert from Zürich

WordPress Custom Product Loop (woocommerce_product_query)

If you want to loop the woocommerce products with your own query, you can follow this tutorial.

Normally if you create a product with different attributes. There will be one product on the shop page and as soon as you click on the product, you can choose, which variation you would like to order.

A customer of mine wanted, that all of their products should be listed with variations. So that means if a t-shirt has 3 colors and 3 sizes, there will be 9 products with different colors and sizes on the shop page.

But you don’t have to show every size on the shop page. So there should be only 3 t-shirts on the shop page with different colors.

WordPress / Woocommerce has a function to override the product loop. It is called woocommerce_product_query.

Rating: 5.0/5. From 1 vote.
Please wait...

Leave a Reply

Your email address will not be published. Required fields are marked *