Posted By

ryarwood on 01/30/12


Tagged


Versions (?)

WP Post Thumbnail


 / Published in: PHP
 

  1. <?php
  2. if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
  3. the_post_thumbnail();
  4. }
  5.  
  6. the_post_thumbnail(); // without parameter -> Thumbnail
  7.  
  8. the_post_thumbnail('thumbnail'); // Thumbnail (default 150px x 150px max)
  9. the_post_thumbnail('medium'); // Medium resolution (default 300px x 300px max)
  10. the_post_thumbnail('large'); // Large resolution (default 640px x 640px max)
  11.  
  12. the_post_thumbnail( array(100,100) ); // Other resolutions
  13.  
  14. ?>

Report this snippet  

You need to login to post a comment.