在編輯 WordPress 文章時,可以在編輯框下面的 「摘要」 中輸入文章簡介,但 WordPress 頁面默認無此功能,通過下面的代碼可以實現 WordPress 頁面 「摘要」 功能。
打開你的當前主題的 functions.php 文件, 並添加以下代碼:
function my_init() {
     add_post_type_support('page', array('excerpt'));
}
add_action('init', 'my_init');