In this post, we will learn how to get product loop by Category Name in woo-commerce,
for that first need to make an array of arguments and then have to get the products like as getting the posts by arguments as the woo-commerce product is also one kind of argument.

woocommerce product loop
Now the example code is given below
- 'product', 'posts_per_page' => -1, 'product_cat' => 'sample_category', 'orderby' => 'rand' ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
- post->ID )) echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog'); else echo '
'; ?> get_price_html(); ?> post, $product ); ?>
Shoes
I hope the post-Woocommerce get product loop by Category Name is helped you
Please provide your comment to make the site better and more useful
Thanks for reading