This question already has an answer here:

I have a category id and now I want to get the list of products which have the same category id.

How to do it?

marked as duplicate by Jacob Peattie, Jack Johansson, Community Nov 28 '17 at 5:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

$args = array(
'post_status' => 'publish',
'tax_query' => array(
     'taxonomy' => 'categories name',
     'field'    => 'id',
     'term'     =>  'category id'
$the_query = wp_query($args);
  • Please edit your answer, and add an explanation: why could that solve the problem? – fuxia Nov 24 '17 at 13:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.