Help Unregistering a Core Block Type in Gutenberg

Everything works for me with allowed_block_types hook.

Example:

add_filter( 'allowed_block_types', 'my_function' );

function my_function( $allowed_block_types ) {

    return array(
        'core/paragraph'
    );

}

You can insert the above code to your functions.php file to a custom plugin. It removes all blocks except the Paragraph block.

More examples here https://rudrastyh.com/gutenberg/remove-default-blocks.html

Leave a Comment