WP_Query for multiple post types just shows one

The issue you’re experiencing is due to how WordPress handles queries with multiple post types. When you specify multiple post types in the post_type parameter of a WP_Query, WordPress will only return posts that match all of the specified post types. In your case, when you include both 'post' and 'podcast' in the post_type array, WordPress tries to find posts that are of both types, which is likely not what you intend.

If you want to query posts from multiple post types separately, you’ll need to create multiple queries or use a custom SQL query to achieve the desired result. Here’s an example of how you could modify your code to query posts from both 'post' and 'podcast' types separately:

$query_posts = array(
  'category_name' => $category,
  'post_type' => 'post',                      
  'posts_per_page'  => '-1',
  'orderby' => 'date'
);
$posts = new WP_Query($query_posts);

$query_podcasts = array(
  'category_name' => $category,
  'post_type' => 'podcast',                      
  'posts_per_page'  => '-1',
  'orderby' => 'date'
);
$podcasts = new WP_Query($query_podcasts);

This way, you’ll have two separate queries, one for posts and one for podcasts, and you can loop through the results of each query separately to display the content.

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduedusedusedueduedueduedusedus