Woocommerce archive layout looper provider showing all product categories and products

Hi,
I use Pro, Cornerstone and WPML on a customers website. WPML is not relevant for my question, I guess.
As far as I understand looper provider and query string, there should be a way to show on the shop page all product categories with a slider with all products from each product category, with a structure like this:
product category 1
product 1
product 2
product 3

product category 2
product 1
product 2
product 3

product category 3
product 1
product 2
product 3

Question 1:
I need two looper providers for this right? 1. looper: product categories, 2. looper: products

Question 2:
Is it right to set up a WC archive layout in this case? The WC archive layout has an inbuilt looper provider, maybe it collides with my product cats looper?

Question 3:
Is it right to set the second looper provider of type “String” with a content like this?

$args = array(
‘post_type’ => ‘products’,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘product_cat’,
‘terms’ => ‚{{dc:term:name}}‘,
),
),
);
Thank you very much!

Best regards,
Hannes

Hello Hannes,

Thanks for writing in!

1.) Yes, you are correct. You need to query the product categories and then run another loop inside each product category.

2.) With this layout, you will not be needing to have a pagination in your shop index. You can add the pagination in the respective product category archive instead.

3.) Yes, that would be the query string.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.