title: Displaying all posts with custom taxonomy using WP_Query
body: <p><a href="https://i.stack.imgur.com/STRg5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/STRg5.jpg" alt="enter image description here"></a></p>
  
  <p>I am trying to display a custom post type that has a custom taxonomy, but I am not having any luck. Nothing is showing up. I appreciate any help.</p>
  
  <p>Post type = university</p>
  
  <p>Custom Taxonomy slug = country</p>
  
  <p>I wanted to show all the country list using WP_Query as there are some custom fields in this taxonomy. Also, on click of any country, it should redirect to a country page with its details</p>
  
  <p>Below is my code</p>
  
  <pre><code>&lt;?php
        $args = array(
          'post_type' =&gt; 'university',
          'tax_query' =&gt; array(
               array(
                   'taxonomy' =&gt; 'country'
               )
           )
        );
  
       $query = new WP_Query($args);
  
       if ($query-&gt;have_posts()) {
          while ($query-&gt;have_posts()) {
             $query-&gt;the_post();
       ?&gt;
  
                &lt;a title="&lt;?php the_title(); ?&gt;"&gt; 
  
                   &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;/h3&gt;
  
                &lt;/a&gt;
       &lt;?php
          }
       }
       wp_reset_postdata();
      ?&gt;
  </code></pre>