Php 自定义函数,用于更改自定义文章类型中的摘录标题和文章缩略图

Php 自定义函数,用于更改自定义文章类型中的摘录标题和文章缩略图,php,wordpress,custom-post-type,meta-boxes,Php,Wordpress,Custom Post Type,Meta Boxes,我想自定义摘录文本,使其更接近我的自定义帖子类型,所以我决定删除元盒,然后再次创建它们。我在functions.php中使用了以下代码: function custom_post_type_boxes(){ remove_meta_box( 'postimagediv', 'alma_client', 'side' ); add_meta_box( 'postimagediv', __( 'Client logo' ), 'post_thumbnail_meta_box', 'a

我想自定义摘录文本,使其更接近我的自定义帖子类型,所以我决定删除元盒,然后再次创建它们。我在functions.php中使用了以下代码:

function custom_post_type_boxes(){
    remove_meta_box( 'postimagediv', 'alma_client', 'side' );
    add_meta_box( 'postimagediv', __( 'Client logo' ), 'post_thumbnail_meta_box', 'alma_client', 'normal', 'high' );
    remove_meta_box( 'postexcerpt', 'alma_client', 'normal' );
    add_meta_box( 'postexcerpt', __( 'List of jobs for this client' ), 'post_excerpt_meta_box', 'alma_client', 'normal', 'core' );
}
add_action('do_meta_boxes', 'custom_post_type_boxes');
出于某种原因,缩略图元盒工作正常,但未绘制摘录元盒。我认为问题可能出在
post_extract_meta_box
上,它是回调函数,但我可能错了


请帮忙!我想我离修复它太近了,但无法解决它。

好吧,问题不在于
post\u extract\u meta\u box
。由于某种原因,当我将优先级从
'core'
更改为
'high'
时,它起了作用。我仍然不知道为什么它是不可见的,因为
'core'
如果有人能告诉我,我仍然想知道。谢谢

生成的代码行是:

add_meta_box( 'postexcerpt', __( 'List of jobs for this client' ), 'post_excerpt_meta_box', 'alma_client', 'normal', 'high' );