WordPress at a glance

has_excerpt() WP 1.0

Whether the post has a custom excerpt.

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

Code of has_excerpt: wp-includes/post-template.php VER 4.9.8

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

Related Functions

From tag: excerpt (fragment, snippet)

More from tag: Conditional tags (all)

More from category: Posts, pages...

No comments
    Hello, !     Log In . Register