title: echo HTML in PHP in Wordpress
body: <p>im trying to build a blogsite with wordpress and im trying to show a clickable picture with a link.</p>
  
  <pre><code>            &lt;?php 
              $counter = get_posts();
              $i = 0;
              while ($i &lt; count($counter)) {
                  $args = array( 'posts_per_page' =&gt; 1,'offset' =&gt; $i );
                  $i = $i + 3;
                  $lastposts = get_posts( $args );
                  foreach ( $lastposts as $post ) :
                  setup_postdata( $post );
                  $permalink = the_permalink();
                  $thumbnail = the_post_thumbnail_url();
                  echo '&lt;a href="'.$permalink.'"&gt;&lt;img src="' . $thumbnail . '"&gt; &lt;/img&gt;&lt;/a&gt;';
                  /*the_post_thumbnail();*/
                  endforeach; 
                  wp_reset_postdata();
              }
  
             ?&gt;
  </code></pre>
  
  <p>I think the echo does not work :/<br>
  The result is this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="col span_1_of_3"&gt;
    This is column 1 http://lena.sbstn.net/2017/04/14/ein-neuer-post/http://lena.sbstn.net/wp-content/uploads/2017/01/22.jpg
    &lt;a href=""&gt; &lt;img src=""&gt; &lt;/a&gt;http://lena.sbstn.net/2017/01/29/new-york-cheesecake/http://lena.sbstn.net/wp-content/uploads/2017/01/image2-525x700.jpg
    &lt;a href=""&gt; &lt;img src=""&gt; &lt;/a&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks for helping</p>