has_excerpt()WP 2.3.0

Whether the post has a custom excerpt.

For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.

No Hooks.


true|false. True if the post has a custom excerpt, false otherwise.


has_excerpt( $post );
Post ID or WP_Post object.
Default: global $post


Since 2.3.0 Introduced.

Code of has_excerpt() WP 5.9.3

function has_excerpt( $post = 0 ) {
	$post = get_post( $post );
	return ( ! empty( $post->post_excerpt ) );