WPDev.one
Core Function
View Source on Trac ↗

has_excerpt()

has_excerpt( mixed $post = 0 )

Determines whether the post has a custom excerpt.

Parameters 1 required

Name / Type Description
(int

| WP_Post) $post Optional. Post ID or WP_Post object. Default is global $post.

Required

Return Value

(bool)
True if the post has a custom excerpt, false otherwise.

Function Information

Since Version
2.3.0
Source File
wp-includes/post-template.php
Advertisement