Enable WordPress Featured Image

posted by Matt Adams

If your wondering how to enable WordPress featured images, your in the right place. First paste the following code in your functions.php file.

add_theme_support('post-thumbnails');

Now in your theme where you’d like the featured image to appear paste the following code.

<?php if (has_post_thumbnail()) : ?>
   <figure class="post-image">
      <?php the_post_thumbnail();?>
   </figure>
<?php endif; ?>