要更改标签,请添加add_new_item 在里面labels array 创建自定义帖子类型时通过。下面是自定义帖子类型“事件”的示例。
add_action( \'init\', \'create_post_type\' );
function create_post_type() {
register_post_type( \'events\',
array(
\'labels\' => array(
\'name\' => __( \'Events\' ),
\'singular_name\' => __( \'Events\' ),
\'add_new_item\' => __( \'Add Event\' ),
\'add_new\' => __( \'Add Event\' ),
\'edit_item\' => __( \'Edit Event\' ),
\'featured_image\' => __( \'Event Image\' ),
\'set_featured_image\' => __( \'Upload Event Image\' ),
\'remove_featured_image\' => __( \'Remove Event Images\' ),
\'menu_name\' => __( \'Manage Events\' ),
),
\'public\' => true,
\'menu_icon\' => \'dashicons-calendar\',
\'has_archive\' => true,
\'supports\' => array(\'title\', \'thumbnail\', \'editor\'),
)
);
}
有关在自定义帖子类型中更改标签的详细信息
refer this link希望这有帮助。