Disable Gutenberg Editor (use Classic Editor)
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
add_action( ‘after_setup_theme’, function() { remove_theme_support( ‘core-block-patterns’ ); });Continue reading
add_filter( ‘allowed_block_types_all’, function ( $allowed_block_types, $block_editor_context ) { // List here the blocks you want to disallow. https://developer.wordpress.org/block-editor/reference-guides/core-blocks/ $disallowed_blocks = array( ‘core/navigation’, ‘core/query’, ); if ( ! is_array( $allowed_block_types ) || empty( $allowed_block_types ) ) { $registered_blocks = WP_Block_Type_Registry::get_instance()->get_all_registered(); $allowed_block_types…Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 10); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 10);Continue reading
function adms_remove_wp_block_library_css(){ wp_dequeue_style( ‘wp-block-library’ ); wp_dequeue_style( ‘wp-block-library-theme’ ); wp_dequeue_style( ‘wc-blocks-style’ ); // Remove WooCommerce block CSS } add_action( ‘wp_print_styles’, ‘adms_remove_wp_block_library_css’, 100 );Continue reading
// Load the Frontend customizer “Additonal CSS” in the block editor. add_action( ‘enqueue_block_editor_assets’, ‘wp_custom_css_cb’ ); // Uncomment below if you need to manually manipulate the CSS for the block editor. // add_action( ‘enqueue_block_editor_assets’, function() { // ob_start(); // wp_custom_css_cb(); //…Continue reading
add_filter( ‘block_editor_settings_all’, function ( $settings ) { $settings[‘codeEditingEnabled’] = current_user_can( ‘manage_options’ ); return $settings; } );Continue reading