默认情况下 WordPress Page 编辑页面没有摘要(Excerpt)输入框,所以对 WordPress 进行 SEO 的时候比较麻烦。

这个时候我们就可以通过以下代码给我 WordPress Page 添加摘要输入框:

add_action( 'admin_menu', 'my_page_excerpt_meta_box' );
 
function my_page_excerpt_meta_box() {
    add_meta_box( 'postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'page', 'normal', 'core' );
}

 将代码添加到当前主题的 functions.php 文件即可。

相关文章:

  • 2021-12-17
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
  • 2022-12-23
  • 2021-07-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案