get_the_excerpt

過濾鉤子
apply_filters( 'get_the_excerpt', $post->post_excerpt, $post )

get_the_excerpt: 這個函式檢索當前文章的摘錄。摘錄是一篇文章的簡短摘要,在某些模板或不需要完整的文章內容的情況下使用。

此過濾器記錄在wpincludes/post-template.php。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
$excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
$excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );

常見問題

FAQs
檢視更多 >