title: Custom Post Type taxonomy page still showing all posts
body: <p>I have a sub-navigation for custom post type 'Projects' taxonomy called "Type": </p>
  
  <pre><code>        &lt;?php $args = array( 'post_type' =&gt; 'projects');
          $the_query = new WP_Query( $args ); ?&gt;
              &lt;?php if ( $the_query-&gt;have_posts() ) : ?&gt;
              &lt;?php while ( $the_query-&gt;have_posts() ) : $the_query-&gt;the_post(); ?&gt;
              &lt;?php   $terms = get_terms('type');
              $currentterm = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); 
                  echo '&lt;ul class="sub-nav-menu"&gt;';
                  foreach ($terms as $term) {
                      $class = $currentterm-&gt;slug == $term-&gt;slug ? 'live' : '' ;
                      echo '&lt;li&gt;&lt;a href="'.get_term_link($term).'" class="'. $class .'"&gt;'.$term-&gt;name.'&lt;/a&gt;&lt;/li&gt;';
                      }
                  echo '&lt;/ul&gt;'; ?&gt;
              &lt;?php endwhile; ?&gt;
              &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>When clicking on taxonomy it takes you to the taxonomy page taxonomy-type.php. </p>
  
  <p>Although this page is still showing all the custom post types not just the ones for the current taxonomy page. </p>
  
  <pre><code>&lt;?php $args = array( 'post_type' =&gt; 'projects');
                      $the_query = new WP_Query( $args ); ?&gt;
              &lt;?php if ( $the_query-&gt;have_posts() ) : ?&gt;
              &lt;?php while ( $the_query-&gt;have_posts() ) : $the_query-&gt;the_post(); ?&gt;
              &lt;?php   $terms = get_terms('type'); ?&gt;
              &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;
                  &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;/h3&gt;
              &lt;/a&gt;
      &lt;?php wp_reset_postdata(); ?&gt;
      &lt;?php endwhile; ?&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>How should I modify the loop to filter only the current taxonomy posts of the 'Type' taxonomy?</p>