A WordPress-centric search engine for devs and theme authors



has_excerpt ›

Since2.3.0
Deprecatedn/a
has_excerpt ( $post = 0 )
Parameters:
  • (int|WP_Post) $post Optional. Post ID or WP_Post object. Default is global $post.
    Required: No
    Default:
Returns:
  • (bool) True if the post has a custom excerpt, false otherwise.
Defined at:
Codex:

Whether the post has a custom excerpt.



Source

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