绿站
绿色文摘
今天是:

交流 | 搜索 | +发贴

给WordPress Page页面添加摘要输入框
nydalu 2024年7月6日 118次

默认情况下 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 文件即可。


  • jcezqbzbta 24-11-01 15:46  

    Muchas gracias. ?Como puedo iniciar sesion?


  • drover sointeru 24-12-28 19:28  

    whoah this blog is great i like studying your posts. Stay up the great work! You know, many people are searching round for this info, you could aid them greatly.

    https://www.droversointeru.com



  • 关于 ·登录·管理
    加载0.293 查询 16