Can anyone help me here. I want to list all the custom posts with the type 'portfolio' in this loop, where they have the 'Project Categories' set to 'ABC'. The below doesn't work, I think the issue is that the '' array parameter is looking at the main WP 'Categories'. Can someone help me to get it working please? Cheers.
$loop = new WP_Query(
array(
'post_type' => 'portfolio',
'posts_per_page' => 50,
'category_name' => 'ABC',
)
);
while ( $loop->have_posts() ) :
$loop->the_post();
?>
<div class="half-column">
<h2><?php the_title(); ?></h2>
</div>
<?php endwhile;
wp_reset_postdata();