Check if the user has explicitly set an excerpt

Is there a way for me to check if the user has explicitly set an excerpt? I need to call the excerpt only if they’ve specified something in the excerpt field, and not an automatically shortened version of the content.

2 Answers
2

Try this:

if ( has_excerpt( $some_post_id ) ) {
    // Do something here?
} else {
    // Or here?
}

References:

  • has_excerpt

Leave a Comment