For blog post page, I have about 100 posts-categories. If I select 2 or 3 or more categories out of them randomly, for example category A and category B, I hope the blog page can only show posts belonging to A and B at same time.
The following code can only show posts belonging to random categories selected by admin under "or" condition. If I select 2 categories randomly, the blog page shows all the posts belonging to any of the selected categories.
$args = Array( 'post_type' => $post_type, 'post_status' => 'publish', 'posts_per_page' => $ppp, 'paged' => $page ); $posts = new WP_Query( $args );
How do I update the code to show posts belonging to all the selected post categories at same time?