Title: if custom excerpt echo, else null
Last modified: August 19, 2016

---

# if custom excerpt echo, else null

 *  Resolved [dunkkan](https://wordpress.org/support/users/dunkkan/)
 * (@dunkkan)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/if-custom-excerpt-echo-else-null/)
 * Hello guys,
 * I’d like a feature that gives me the custom excerpt if it exist, print nothing
   if he’s not there (as normally you’d get the default excerpt).
 * Do you know how it could be done ?
 * Thanks.

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/if-custom-excerpt-echo-else-null/#post-1061999)
 * In a post loop, the variable $post->post_excerpt will contain the excerpt you‘
   handcrafted’.
 *     ```
       <?php
       echo '<p>the handcrafted excerpt' . $post->post_excerpt . '</p>';
       echo '<p>the_excerpt function </p>';
       the_excerpt();
   
       if ( !empty( $post->post_excerpt ) ) {
       echo ' you handcrafted an excerpt';
       }
   
       ?>
       ```
   
 *  Thread Starter [dunkkan](https://wordpress.org/support/users/dunkkan/)
 * (@dunkkan)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/if-custom-excerpt-echo-else-null/#post-1062014)
 * Wow Michael that’s pure goodness. Thanks very much.

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

The topic ‘if custom excerpt echo, else null’ is closed to new replies.

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [dunkkan](https://wordpress.org/support/users/dunkkan/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/if-custom-excerpt-echo-else-null/#post-1062014)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
