Title: Enabling thumbnails from posts
Last modified: August 19, 2016

---

# Enabling thumbnails from posts

 *  Resolved [machination](https://wordpress.org/support/users/machination/)
 * (@machination)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/enabling-thumbnails-from-posts/)
 * Hello,
 * I’ve been trying various plugins that enable thumbnails for excerpts and other
   uses of the thumbnail-from-posts / featured image functionality.
 * However, I can’t seem to get the thumbnails to show up anywhere.
 * I’m currently trying out the Filterable Portfolio and followed all the instructions:
   [http://www.wearepixel8.com/blog/filterable-portfolio/](http://www.wearepixel8.com/blog/filterable-portfolio/)
 * I put this in my functions.php:
    add_theme_support( ‘post-thumbnails’ ); set_post_thumbnail_size(
   150, 150, true ); and it lets me upload thumbnails via the individual post pages.
   I can see the newly-uploaded thumbnail.
 * But I created my own theme, so I’m wondering if I have to enable something somewhere
   else or if I’m missing something when it comes to activating the “Featured Image”.
 * Any help or guidance would be really appreciated!
 * Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [nastycanasta](https://wordpress.org/support/users/nastycanasta/)
 * (@nastycanasta)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/enabling-thumbnails-from-posts/#post-1879911)
 * Try this code in your functions.php, this works if you have a featured image 
   uploaded to your post and you want it to show up if you’re using excerpts. You
   can change the size of the thumbnail in the array
 *     ```
       function my_excerpts($content = false) {
               // If is the home page, category, an archive, or search results
       	if(is_front_page() || is_home() || is_category() || is_archive() || is_search()) :
       		global $post;
       		$content = $post->post_excerpt;
   
       	// If an excerpt is set in the Optional Excerpt box
   
       		if($content) :
   
        the_post_thumbnail(array(200,160), array('class' => 'alignleft excerpt-thumbnail'));
       			$content = apply_filters('the_excerpt', $content);
   
       	// If no excerpt is set
       		else :
       			$content = $post->post_content;
       			$excerpt_length = 55;
       			$words = explode(' ', $content, $excerpt_length + 1);
       			if(count($words) > $excerpt_length) :
       				array_pop($words);
       				array_push($words, '...');
       				$content = implode(' ', $words);
       			endif;
       			$content = '' . $content . '
   
       ';
   
       		endif;
       	endif;
   
       // Make sure to return the content
       	return $content;
   
       }
   
       add_filter('the_content', 'my_excerpts');
       ```
   
 *  Thread Starter [machination](https://wordpress.org/support/users/machination/)
 * (@machination)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/enabling-thumbnails-from-posts/#post-1879921)
 * Doesn’t seem to be working properly.
 * Here’s the functions.php file: [http://pastebin.com/Ecye08mG](http://pastebin.com/Ecye08mG)
 *  Thread Starter [machination](https://wordpress.org/support/users/machination/)
 * (@machination)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/enabling-thumbnails-from-posts/#post-1879943)
 * OK, I re-did the post and it seems to be working now without any further code.
   Thanks for the help though!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Enabling thumbnails from posts’ is closed to new replies.

## Tags

 * [images](https://wordpress.org/support/topic-tag/images/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [thumbnails](https://wordpress.org/support/topic-tag/thumbnails/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [machination](https://wordpress.org/support/users/machination/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/enabling-thumbnails-from-posts/#post-1879943)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
