Enable Post Thumbnails in Your WordPress Theme

Enable Post Thumbnails in Your WordPress Theme

If you want to have post thumbnails appear on your homepage, it’s very easy to add this to your WordPress theme ever since 2.9.

Just open functions.php and add:

add_theme_support( 'post-thumbnails' );

Then within your homepage template add the following tag:

<?php the_post_thumbnail(); ?>

Now you’ll be able to set the Featured Image or the Thumbnail Image for the post. The settings for this are in a widget that will appear in the right sidebar of the post editor just below categories and tags.

FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

More information about how to use post thumbnails and adjust their default sizes can be found at Mark Jaquith’s tutorial on the subject.

Tags: