Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Kristjan Reinsberg
50,960 PointsADD THUMBNAILS TO POST
Learned a new trick :D
THUMBNAIL TUTORIAL FOR POSTS:
-1-STEP-
// To enable Post Thumbnails, the current theme must include add_theme_support( 'post-thumbnails' ); ( add to functions.php add following )
-2-STEP- (optional)
// Gets the Featured Image (formerly called Post Thumbnail) as set in post's or page's edit screen and returns an HTML image element representing a Featured Image, if there is any, otherwise an empty string.
set_post_thumbnail_size( 330, 200); ( add to functions.php under the -STEP1- )
-3-STEP-
Go to dashboard. Open some kind of post and on thr right side you can see Featured Image BoX. Add the image with the media library and you are done :)
5 Answers

Zac Gordon
Treehouse Guest TeacherSweet, thanks for sharing!!
Anthony Hind
5,715 PointsAm I missing something how do I then get the featured image to display on the front end of my site?
Anthony Hind
5,715 PointsIv figured it out guys

lscoates
4,134 PointsTo display the thumbnail
-4-STEP-
if ( has_post_thumbnail() ) { the_post_thumbnail(); }

lscoates
4,134 Points.