2
在自定义帖子类型上启用古腾堡
我有以下自定义帖子类型: function create_posttype() { register_post_type( 'companies', array( 'labels' => array( 'name' => __( 'شرکتهای عضو' ), 'singular_name' => __( 'شرکت' ) ), 'supports' => array('title', 'editor', 'custom-fields', 'excerpt', 'thumbnail'), 'public' => true, 'has_archive' => true, 'rewrite' => array('slug' => 'companies'), ) ); } add_action( 'init', 'create_posttype' ); 在WordPress管理区域中显示经典编辑器。我试图在supports数组中将'editor'替换为'gutenberg',这是行不通的。我还添加了此代码,以我的功能建议在这里: add_filter('gutenberg_can_edit_post_type', 'prefix_disable_gutenberg'); …