title: retrieve wordpress featured image (thumbnail) programmatically
body: <p>HI I am using wordpress v3.03 and I am wondering how do I get featured images for the post in my theme</p>
  
  <p>Currently I am using</p>
  
  <pre><code>get_the_post_thumbnail( $post-&gt;ID, 'post-thumbnail')
  </code></pre>
  
  <p>and it worked fine with 1 images, but when i kept add new images the above code always retrieve the first image i attached to the post instead of the image i set as "featured"</p>
  
  <p>any help will be appreciated</p>