Skip to content

How to enable WordPress Post thumbnails?

Last updated on February 10, 2018

In this post, I would like to show you how to enable WordPress post thumbnails on your WordPress theme. Post thumbnails are pretty useful and very easy to activate.To enable post thumbnails simply paste the following code into your current theme’s functions.php file.

// add post thumbnail support 
add_theme_support('post-thumbnail');

How to Display

Now to Display Post Thumbnail in views, past the fallowing code.

// check for thumbnail 
if(has_post_thumbnail()) {
  the_post_thumbnail();
}

Reference URLs

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments