文章描述:
WordPress如何给页面添加摘要功能
自定义
functions.php
add_action(\'init\', \'page_excerpt\');
function page_excerpt() {
add_post_type_support(\'page\', array(\'excerpt\'));
}
主题
page.php
if( has_excerpt() ){
the_excerpt();
}
© 版权声明
THE END
请登录后查看评论内容