我猜你想删除Publish: XXXXX 如下图所示。

到下面没有
Publish: XXXXX
要做到这一点,您需要创建一个CSS文件,并向主题的函数中添加一些代码。php文件或插件文件。
CSS文件将包含以下代码,
.edit-post-post-publish {
display: none;
}
命名css文件
delete-published-on-from-gutenberg.css 并将其放置在主题或插件的css文件夹中。
接下来,需要将以下代码添加到主题的函数中。php文件或插件文件。
function delete_published_on_from_gutenberg() {
$your_post_type = "book"; // Change this to your post type.
$current_post_type = get_current_screen();
if($current_post_type == $your_post_type) {
wp_enqueue_style( "delete-published-on-from-gutenberg", get_template_directory_uri() . "/css/delete-published-on-from-gutenberg.css", array(), "1.0" );
// Replace get_template_directory_uri() . "/css/delete-published-on-from-gutenberg.css" with plugin_dir_url( __FILE__ ) . "css/delete-published-on-from-gutenberg.css" if you are creating a plugin.
}
}
add_action( "enqueue_block_editor_assets", "delete_published_on_from_gutenberg" );