Title: Hide empty excerpt
Last modified: August 18, 2016

---

# Hide empty excerpt

 *  [fabioassis](https://wordpress.org/support/users/fabioassis/)
 * (@fabioassis)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/hide-empty-excerpt/)
 * What may I do to hide the excerpt if it’s empty?
    My (cleaned) code looks like
   this: ` <?php if ($posts) { foreach ($posts as $post) { start_wp(); ?> <?php 
   the_title(); ?> <?php the_excerpt(); ?> <?php the_content(); ?>  Now, WP repeats
   the content.

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

 *  [perfectionisboring](https://wordpress.org/support/users/perfectionisboring/)
 * (@perfectionisboring)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/hide-empty-excerpt/#post-94599)
 * I ran into the same problem today, so I hope someone can help both of us with
   this problem. I am working on a music review site where I put the cd image in
   the excerpt, but for posts without an image (like site news) it repeats the content
   twice since the excerpt was left blank.
 *  [Mary Linville](https://wordpress.org/support/users/sunshine/)
 * (@sunshine)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/hide-empty-excerpt/#post-94643)
 * Practially identical suggestion:
    [http://scriptygoddess.com/archives/2004/06/05/optionally-show-excerpt/](http://scriptygoddess.com/archives/2004/06/05/optionally-show-excerpt/)
   🙂
 *  [Mike](https://wordpress.org/support/users/mike/)
 * (@mike)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/hide-empty-excerpt/#post-94666)
 * Indeed. Coincidence.
 *  [Mary Linville](https://wordpress.org/support/users/sunshine/)
 * (@sunshine)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/hide-empty-excerpt/#post-94675)
 * Uh, I wasn’t suggesting that it wasn’t.
 *  Thread Starter [fabioassis](https://wordpress.org/support/users/fabioassis/)
 * (@fabioassis)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/hide-empty-excerpt/#post-94704)
 * Tks, guys!

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

The topic ‘Hide empty excerpt’ is closed to new replies.

## Tags

 * [excerpts](https://wordpress.org/support/topic-tag/excerpts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [fabioassis](https://wordpress.org/support/users/fabioassis/)
 * Last activity: [21 years, 6 months ago](https://wordpress.org/support/topic/hide-empty-excerpt/#post-94704)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
