Wordpress 2.9 Post Thumbnail


/ Published in: PHP
Save to your folder(s)

Is also generates the .wp-post-image class for us to style


Copy this code and paste it in your HTML
  1. <?php add_theme_support('post-thumbnails'); ?> //add this to functions.php
  2.  
  3. <?php the_post_thumbnail('thumbnail'); ?> //use this to grab the thumb version of the image
  4. <?php the_post_thumbnail('medium'); ?> //use this to grab the medium version of the image
  5. <?php the_post_thumbnail('large'); ?> //use this to grab the large version of the image

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.