Display posts from specific slug of the custom taxonomy in WordPress
I would recommend becoming intimately familiar with the WP_Query parameters: https://developer.wordpress.org/reference/classes/wp_query/ In your particular case; dealing with taxonomies: https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters Here is the proper code to pull from a taxonomy: $args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘units’, ‘field’ => ‘slug’, ‘terms’ => $term->slug ), ), ); $query = new WP_Query( … Read more