Gutenberg Wordpress

Remove Gutenberg blocks

Add the following code to only allow some Gutenberg blocks to your WordPress site.

add_filter('allowed_block_types', 'setAllowedBlocks');

function setAllowedBlocks($allowed_blocks) {
	$allowed_blocks = array(
        'core/image',
		'core/paragraph',
		'core/heading',
		'core/list'
	);

	return $allowed_blocks;
}
Continue Reading…