Warning: Invalid argument supplied for foreach() in /home3/digestwp/public_html/wp-content/plugins/wp-twitter-timeline/wp-twitter-timeline.php on line 236

Add featured images to excerpts

Some older themes or even few new ones do not use featured images in their excerpts. Adding them is quite simple though.

First make sure your theme’s functions file does not contain the following lines.

add_theme_support('post-thumbnails');

If you do not find this in your code add it to your functions file.

To call the featured image you have to see what is controlling these excerpts whether index.php, archive.php, category.php etc.. Add the following line:

<?php the_post_thumbnail( 'thumbnail' ); ?>

2 Comments

  • Melanie Reed says:

    I started to use this and it does pull the featured image but it puts it the wrong place. Is there a certain place it goes in the archive.php? Thanks!

    • Bill says:

      Hi Melanie,

      You would want to put the code inside the loop and probably wrap it in a div or something so you can control where it shows relevant to the post excerpt.

Leave a Reply