Loop a Single Taxonomy and Output all Posts Associated (but also show a message for empty ones)
You can simply add an if statement around your foreach loop to first check to see if there are posts available, and then output a message or loop through the posts. global $post; // <- Don’t forget this at the top of the page! // … $terms = get_terms( array( ‘taxonomy’ => ‘location’, ‘hide_empty’ => … Read more