To disable Gutenberg there are a few plugins available, but, you can cut to the chase with these snippets:
function classic_editor_addon_hardcode_replace( $value ) {
return 'replace';
}
function classic_editor_addon_remove_settings_link() {
remove_filter( 'plugin_action_links', 'classic_editor_add_settings_link' );
}
function classic_editor_hide_settings() {
?>
Writing screen
*/
add_action( 'admin_footer', 'classic_editor_hide_settings' );
}
}
add_action( 'plugins_loaded', 'classic_editor_addon_init', 1, 0 );
OPTIONAL:
Also try adding this to the theme function:
add_filter( 'gutenberg_can_edit_post_type', '__return_false' );
and this to remove the ‘Gutenberg’ menu item if name not listed:
function remove_guty_menu(){
$admins = array(
'USER NAME TO ALLOW'
);
$current_user = wp_get_current_user();
if( !in_array( $current_user->user_login, $admins ) ){
remove_menu_page('gutenberg');
}
}
add_action( 'admin_menu', 'remove_guty_menu', 999 );