How to: Adding a Featured Image in WordPress

wordpress-logo-teal1. In functions.php:

add_theme_support( 'post-thumbnails' );

2. To display featured images in your theme, you need to edit your templates and add this line of code where you want to display the featured image:

3. To set custom size in functions.php:

set_post_thumbnail_size( 50, 50);

4. To add additional image sizes:

// Image size for single posts
add_image_size( ‘single-post-thumbnail’, 590, 180 );

5. Here is how to call a custom image size:

Special thanks to:



Recent Posts