why when i using this code :
$paramss = array('post_in' => array( 760, 761) , 'post_type' => 'product');
$wc_querya = new WP_Query($paramss);
i get 5 products list and not only product with id 760,761 ?
Regards
why when i using this code :
$paramss = array('post_in' => array( 760, 761) , 'post_type' => 'product');
$wc_querya = new WP_Query($paramss);
i get 5 products list and not only product with id 760,761 ?
Regards
Share Improve this question edited Jul 22, 2020 at 4:59 Jacob Peattie 44.1k10 gold badges50 silver badges64 bronze badges asked Jul 22, 2020 at 4:40 GilGil 31 bronze badge1 Answer
Reset to default 0As documented, it's post__in
, with two underscores:
$paramss = array( 'post__in' => array( 760, 761 ) , 'post_type' => 'product' );