Hey guys I am trying to get all post of a specific SUBCATEGORY (No category)
I'm using the subcategory ID ($option_id) on my code like this:
$option_id = get_cat_ID($option);
$query_args = array(
'post_type' => 'post',
'cat' => $option_id,
// 'category_name' => $option,
// 'category_in' => $option_id,
'posts_per_page' => 8,
'paged' => $paged
);
$the_query = new WP_Query( $query_args );
while( $the_query->have_posts() ):
$the_query->the_post();
// Article code here...
endwhile;
wp_reset_query();
This is not working with the subcategories, but is working on categories.
Note: I have tried using category_name and category_in, I have the same result.