admin管理员组文章数量:1130349
I'd like to utilize excerpt field on pages. How do I enable it?
Currently excerpt block only shows on posts in sidebar. But on pages it’s missing.
I'd like to utilize excerpt field on pages. How do I enable it?
Currently excerpt block only shows on posts in sidebar. But on pages it’s missing.
1 Answer
Reset to default 21It's nothing new with the block editor, it's the same age-old way by putting the following code into your theme's functions.php:
add_action( 'init', 'wpse325327_add_excerpts_to_pages' );
function wpse325327_add_excerpts_to_pages() {
add_post_type_support( 'page', 'excerpt' );
}
Here's my screenshot in a fresh WordPress 5.0.3 install:
I'd like to utilize excerpt field on pages. How do I enable it?
Currently excerpt block only shows on posts in sidebar. But on pages it’s missing.
I'd like to utilize excerpt field on pages. How do I enable it?
Currently excerpt block only shows on posts in sidebar. But on pages it’s missing.
1 Answer
Reset to default 21It's nothing new with the block editor, it's the same age-old way by putting the following code into your theme's functions.php:
add_action( 'init', 'wpse325327_add_excerpts_to_pages' );
function wpse325327_add_excerpts_to_pages() {
add_post_type_support( 'page', 'excerpt' );
}
Here's my screenshot in a fresh WordPress 5.0.3 install:
本文标签: block editorAllow excerpt for pages in Gutenberg
版权声明:本文标题:block editor - Allow excerpt for pages in Gutenberg? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749021968a2304516.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论