Good day,
We are trying to allow our editors to select between block or classic editor. We installed Classic editor plugin https://wordpress.org/plugins/classic-editor/ but it is not working because toolset is overwriting its behavior.
It works for posts, but we have several Custom post types registered by code where it does not work. These CPT do not appear listed under toolset post types so we are unable to edit the editor's capabilities for them.
Is there a way to deactivate editor overwriting of toolset so we may manage this with classic editor plugin?
or how may we display custom post types created by code in the toolset dashboard?
Thank you,
or how may we display custom post types created by code in the toolset dashboard?
A public post type registered with code should appear in the Toolset Dashboard under "Custom post types created by the theme and other plugins", but Toolset does not provide editor options for these post types. Only post types created in Toolset Types will have those editor options displayed.
I was just playing around with this to see the problem, but I didn't see an override preventing me from switching editors. With Types active, I registered a new custom post type with code, enabling the Gutenberg editor with supports=>('editor') and 'show_in_rest'=>true in the CPT setup code:
function foobar_custom_post_type() {
register_post_type('foobar',
array(
'labels' => array(
'name' => __('Foobars', 'textdomain'),
'singular_name' => __('Foobar', 'textdomain'),
),
'supports' => array('title', 'editor', 'excerpt', 'thumbnail'),
'public' => true,
'show_in_rest' => true,
'has_archive' => true,
)
);
}
add_action('init', 'foobar_custom_post_type');
In Toolset > Settings > General, I have enabled both block and legacy editing experiences. I activated the Classic Editor plugin and in wp-admin > Settings > Writing, I chose the block editor by default, and activated "Allow Users to switch editors". It seems to be working well for the foobar custom post type. By default for new posts, I see the block editor. In the 3-dot menu in the top right corner of the Block Editor, I have the ability to switch to the Classic Editor - I guess this is added by the Classic Editor plugin. In the Classic Editor, I have the ability to switch back to the Block Editor with a link in the sidebar - again, I guess this is added by the Classic Editor plugin.
Maybe our Toolset or post type configurations are different? Or maybe I don't understand the problem?