Title: Access post excerpt through $post variable
Last modified: August 18, 2016

---

# Access post excerpt through $post variable

 *  Resolved [obeattie](https://wordpress.org/support/users/obeattie/)
 * (@obeattie)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/access-post-excerpt-through-post-variable/)
 * Hey Guys,
 * Was just wondering if anyone knew of a way to access a post’s excerpt through
   the $post global variable, as opposed to using the_excerpt. I want to run this
   through urlencode, so as the_excerpt echoes the result, I can’t use that.
 * Many Thanks in Advance,
    Oliver
 * P.S. I can’t find any documentation for the post variable – so don’t know what
   the end of it is (I thought maybe $post->excerpt but that didn’t work!)

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

 *  [Austin Matzko](https://wordpress.org/support/users/filosofo/)
 * (@filosofo)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/access-post-excerpt-through-post-variable/#post-449679)
 * `get_the_excerpt()` should do it.
 *  Thread Starter [obeattie](https://wordpress.org/support/users/obeattie/)
 * (@obeattie)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/access-post-excerpt-through-post-variable/#post-449738)
 * Thanks – works perfectly!

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

The topic ‘Access post excerpt through $post variable’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [obeattie](https://wordpress.org/support/users/obeattie/)
 * Last activity: [19 years, 9 months ago](https://wordpress.org/support/topic/access-post-excerpt-through-post-variable/#post-449738)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
