title: Wordpress "Featured image" stopped working on custom php page (V 3.8.1)
body: <p>I have a strange problem which I'm hoping is just due to me missing something obvious...</p>
  
  <p>Our Wordpress installation has upgraded to 3.8.1 recently. We use WordPress within a directory on the site as part of our news items. We loop through posts in other sections of our site to show latest news etc</p>
  
  <p>We have featured image enabled, and have the featured images showing on the wordpress/news home page by using the following code:</p>
  
  <pre><code>&lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;div class="snippet-featured-img"&gt;&lt;?php the_post_thumbnail('thumbnail'); ?&gt;&lt;/div&gt;&lt;/a&gt;
  </code></pre>
  
  <p>This works fine, and outputs the 150px by 150px featured image.</p>
  
  <p>We also wish to show the featured image next to the posts we loop through on the other pages of the site, but we can't seem to get it working.</p>
  
  <p>This is the code:</p>
  
  <pre><code>foreach($posts as $post) {
  setup_postdata($post);
  if ( has_post_thumbnail() ) {
  echo "&lt;a href='";
  echo the_permalink();
  echo "'&gt;";
  the_post_thumbnail(array('50','50'));
  echo "&lt;/a&gt;";
  }
  echo "&lt;h2&gt;&lt;a href=\"";
  echo the_permalink();
  echo "\" rel=\"bookmark\" title=\"Permanent Link to ";
  echo the_title();
  echo "\"&gt;";
  echo the_title();
  echo "&lt;/a&gt;&lt;/h2&gt;\n&lt;p&gt;";
  $string = strip_tags(strip_shortcodes($post-&gt;post_content));
  echo chop_string($string,190,'...');
  echo " &lt;a href=\"";
  echo the_permalink();
  echo "\" rel=\"bookmark\" title=\"Permanent Link to ";
  echo the_title();
  echo "\"&gt;";
  echo "Read More&lt;/a&gt;&lt;/p&gt;\n";
  echo "&lt;div class='clear'&gt;&lt;/div&gt;\n";
  } 
  </code></pre>
  
  <p>The post var is declared a bit higher up the script:</p>
  
  <pre><code>$posts = get_posts('numberposts=8&amp;orderby=date');
  </code></pre>
  
  <p>Everything except the image is outputted, even the link around where the image should be is outputted, indicating that the has_post_thumbnail() func has returned true. As I said, it's also working on the wordpress page itself. </p>
  
  <p>I have tried with 'thumbnail' passed instead of the size array, and also get_the_post_thumbnail(), and I'm at a loss as to why it's not working!</p>
  
  <p>Any help would be great</p>
  
  <p>Thanks </p>