下面的例子增加了对页面(page)的编辑页面添加“摘要”的输入框(假设它不在“屏幕选项”下显示):
<?php
/**
* Enables the Excerpt meta box in Page edit screen.
*/
function wpcodex_add_excerpt_support_for_pages() {
add_post_type_support( 'page', 'excerpt' );
}
add_action( 'init', 'wpcodex_add_excerpt_support_for_pages' );
?>
评论区
发表新的留言
您可以留言提出您的疑问或建议。
您的留言得到回复时,会通过您填写的邮箱提醒您。