title: Thumbnail and attachment syntax on Wordpress
body: <p>I use code like this, but unfortunately did not work. The error is the image failed to load, but the code display on the page.</p>
  
  <pre><code> &lt;?php 
  $nextthumb = get_the_post_thumbnail($nextPost-&gt;ID);
  $img_urltest = wp_get_attachment_url( $nextthumb,'full' ); 
  $imagetest = aq_resize( $img_urltest, 500,325, true );  
  
  $thumb = get_post_thumbnail_id(); 
  $img_url = wp_get_attachment_url( $thumb,'full' ); 
  $image = aq_resize( $img_url, 500,325, true ); 
   ?&gt;
   &lt;img src=" 
   &lt;?php if($image) { 
   echo $image; 
   } 
   else { 
   echo $nextthumb; 
   } 
   ?&gt;
   "alt="&lt;?php  echo get_bloginfo('name'); ?&gt;"/&gt; 
  </code></pre>