i have product cat with id=5 and have 10 product
i show list 5 product by id as
$args = array( 'post_type' => 'product', 'posts_per_page' => 5, 'product_cat' => 5 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); global $product;
**** loop code *****
endwhile;
wp_reset_query();
but is error code(don't show any product). if i change 'product_cat' => 5
by slug as 'product_cat' => 'slug_name'
is true.
How to show product by id = 5
Thanks