Update 01/2022: I’ve written an updated version of this bost with (arguably) better method of controlling blocks. Check it out here.

Update 03/2021: Updated, sortable list of core blocks with some bonus plugin blocks can be found here.


To enable just some default blocks insert the following code to your theme functions.php or in a plugin.

add_filter( 'allowed_block_types', 'my_allowed_block_types' );
function my_allowed_block_types( $allowed_blocks ) {
	return array(
		'core/cover',
		'core/image',
		'core/paragraph',
		'core/heading'
	);
}

If you need to enable blocks on a per post type basis, you can do so by adding $post parameter to your hook and checking for post type when specifying allowed blocks.

add_filter( 'allowed_block_types', 'my_allowed_block_types', 10, 2 );
function my_allowed_block_types( $allowed_blocks, $post ) {
	$allowed_blocks = array(
		'core/cover',
		'core/image',
		'core/paragraph',
		'core/heading'
	);
	if( $post->post_type === 'page' ) {
		$allowed_blocks[] = 'core/list';
	}
	return $allowed_blocks;
}

The example above would allow cover, image, paragraph and heading blocks for all post types and additionally list block for pages.

All Gutenberg default blocks listed

Below you’ll find list of all (to my knowledge) default Gutenberg block slugs to use in your theme / plugin to enable them.

// These need to be enabled to save reusable blocks and templates
'core/block',
'core/template',

// Common blocks
'core/paragraph',
'core/image',
'core/heading',
'core/subhead', // DEPRECATED Subheading
'core/gallery',
'core/list',
'core/quote',
'core/audio',
'core/cover', // Previously core/cover-image
'core/file',
'core/video',

// Formatting
'core/table',
'core/verse',
'core/code',
'core/freeform', // Classic editor
'core/html', // Custom HTML
'core/preformatted',
'core/pullquote',

// Layout Elements
'core/button',
'core/buttons', // New in 5.4 (https://wp.me/p2AvED-kKc)
'core/columns', // Columns, previously 'core/text-columns'
'core/media-text', // Media and Text
'core/more',
'core/nextpage', // Page break
'core/separator',
'core/spacer',

// Widgets
'core/social-links', // New in 5.4 (https://wp.me/p2AvED-kKc)
'core/shortcode',
'core/archives',
'core/categories',
'core/latest-comments',
'core/latest-posts',
'core/calendar',
'core/rss',
'core/search',
'core/tag-cloud',

// Embeds
'core/embed',

/* 
NOTE - individual embeds listed here are deprecated 
since Gutenberg 9.0. More info with instructions how 
to disable individual embeds in 9.0 and later can be 
found here: https://github.com/WordPress/gutenberg/issues/25676

List of all current block variations can be found below
*/

'core-embed/twitter',
'core-embed/youtube',
'core-embed/facebook',
'core-embed/instagram',
'core-embed/wordpress',
'core-embed/soundcloud',
'core-embed/spotify',
'core-embed/flickr',
'core-embed/vimeo',
'core-embed/animoto',
'core-embed/cloudup',
'core-embed/collegehumor',
'core-embed/dailymotion',
'core-embed/funnyordie',
'core-embed/hulu',
'core-embed/imgur',
'core-embed/issuu',
'core-embed/kickstarter',
'core-embed/meetup-com',
'core-embed/mixcloud',
'core-embed/photobucket',
'core-embed/polldaddy',
'core-embed/reddit',
'core-embed/reverbnation',
'core-embed/screencast',
'core-embed/scribd',
'core-embed/slideshare',
'core-embed/smugmug',
'core-embed/speaker',
'core-embed/ted',
'core-embed/tumblr',
'core-embed/videopress',
'core-embed/wordpress-tv'

Unregister all Embed block variations

wp.blocks.unregisterBlockVariation('core/embed', 'amazon-kindle');
wp.blocks.unregisterBlockVariation('core/embed', 'animoto');
wp.blocks.unregisterBlockVariation('core/embed', 'cloudup');
wp.blocks.unregisterBlockVariation('core/embed', 'crowdsignal');
wp.blocks.unregisterBlockVariation('core/embed', 'dailymotion');
wp.blocks.unregisterBlockVariation('core/embed', 'flickr');
wp.blocks.unregisterBlockVariation('core/embed', 'imgur');
wp.blocks.unregisterBlockVariation('core/embed', 'issuu');
wp.blocks.unregisterBlockVariation('core/embed', 'kickstarter');
wp.blocks.unregisterBlockVariation('core/embed', 'meetup-com');
wp.blocks.unregisterBlockVariation('core/embed', 'mixcloud');
wp.blocks.unregisterBlockVariation('core/embed', 'reddit');
wp.blocks.unregisterBlockVariation('core/embed', 'reverbnation');
wp.blocks.unregisterBlockVariation('core/embed', 'screencast');
wp.blocks.unregisterBlockVariation('core/embed', 'scribd');
wp.blocks.unregisterBlockVariation('core/embed', 'slideshare');
wp.blocks.unregisterBlockVariation('core/embed', 'smugmug');
wp.blocks.unregisterBlockVariation('core/embed', 'soundcloud');
wp.blocks.unregisterBlockVariation('core/embed', 'speaker-deck');
wp.blocks.unregisterBlockVariation('core/embed', 'spotify');
wp.blocks.unregisterBlockVariation('core/embed', 'tiktok');
wp.blocks.unregisterBlockVariation('core/embed', 'ted');
wp.blocks.unregisterBlockVariation('core/embed', 'twitter');
wp.blocks.unregisterBlockVariation('core/embed', 'tumblr');
wp.blocks.unregisterBlockVariation('core/embed', 'videopress');
wp.blocks.unregisterBlockVariation('core/embed', 'vimeo');
wp.blocks.unregisterBlockVariation('core/embed', 'wordpress');
wp.blocks.unregisterBlockVariation('core/embed', 'wordpress-tv');
wp.blocks.unregisterBlockVariation('core/embed', 'youtube');