I have a custom post type called
listing and a custom taxonomy called
listing_category. When I navigate to
[DOMAIN]/listing/things-to-do, I would like the posts with the category of
things-do-do to display only, however currently ALL posts under the
listing post type are displayed. I am using the following:
$args = array( 'posts_per_page' => get_option('posts_per_page'), 'post_type' => 'listing', 'tax_query' => [ 'taxonomy' => 'listing_category', 'field' => 'slug', 'terms' => array(81) ] );
81 being the ID of the
things-to-do category, though I have also tried by slug - still no joy.
Anything I'm missing here?