title: How to wrap echo div in <a href>
body: <p>I'm running into two problems transferring a Wordpress archive page into a page template. </p>
  
  <pre><code>&lt;?php $args = array( 'post_type' =&gt; 'casestudies', 'posts_per_page' =&gt; 12 );
  $loop = new WP_Query( $args );
  while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post();
  
  echo '&lt;div class="casestudy"&gt;'.get_the_post_thumbnail( $post-&gt;ID, '180,180' ).'&lt;/div&gt;';
  </code></pre>
  
  <p>First I need to wrap the echo for the thumbnail with a link in order to trigger a css action:</p>
  
  <pre><code>'&lt;a href="'.the_permalink().'" class="anchor-hover"&gt;';
  </code></pre>
  
  <p>When I add that a href line it only prints the link, and doesn't wrap the echo.</p>
  
  <p>The a href should then print the title and excerpt over the thumbnail box:</p>
  
  <pre><code> '&lt;span class="details"&gt;&lt;div class="anchor-hover details-h3"&gt;&lt;?php the_title(); ?&gt;&lt;/div&gt;';
   '&lt;p class="desc"&gt;&lt;?php echo get_post($post_id)-&gt;post_excerpt; ?&gt;&lt;/p&gt;&lt;/span&gt;&lt;/a&gt;';
  
  endwhile; ?&gt;
          &lt;div class="clear"&gt;&lt;/div&gt;
          &lt;/div&gt;&lt;/div&gt;
  </code></pre>