+44 0330 223 3428
Call Us
+44 0330 223 3428

WPTavern: One Way to Whitelist and Blacklist Blocks in Gutenberg

WPTavern: One Way to Whitelist and Blacklist Blocks in Gutenberg

Gutenberg ships with a number of blocks but what if your client or project doesn’t need most of them? The Gutenberg Handbook explains how to create a whitelist and a blacklist for blocks but in some circumstances, Gutenberg does not respect the allowed_block_types filter.

Jason Bahl, a WordPress Engineer at Digital First Media, published a tutorial that explains how to whitelist and blacklist blocks using a filterable, localized array.

One thing to keep in mind is that Gutenberg development is in a high state of flux and Bahl warns that his technique is fragile and will likely cause things to break over time. He suggests keeping a close eye on Gutenberg development to see how blacklisting/whitelisting evolves in the plugin.


Gutenberg ships with a number of blocks but what if your client or project doesn’t need most of them? The Gutenberg Handbook explains how to create a whitelist and a blacklist for blocks but in some circumstances, Gutenberg does not respect the allowed_block_types filter. Jason Bahl, a WordPress Engineer at Digital First Media, published a tutorial that explains how to whitelist and blacklist blocks using a filterable, localized array. One thing to keep in mind is that Gutenberg development is in a high state of flux and Bahl warns that his technique is fragile and will likely cause things to…

Source: WordPress

Related Post
WPTavern: Clean Blocks: A Free Multipurpose WordPress Theme Compatible with Gutenberg

WPTavern: Clean Blocks: A Free Multipurpose WordPress Theme Compatible with Gutenberg Clean Blocks is a new free theme from Catch Themes that was released last week on WordPress.org. The design is suitable for businesses, agencies, freelancers, and other service professionals who require featured content, a portfolio, testimonials, a blog, and a services section. Clean Blocks […]

Read more
WPTavern: Laraberg, a Gutenberg Implementation for Laravel, is Now in Beta

WPTavern: Laraberg, a Gutenberg Implementation for Laravel, is Now in Beta The family of Gutenberg derivatives is expanding with the beta release of Laraberg, an implementation for Laravel. Maurice Wijnia, a developer at Van Ons, an agency based in Amsterdam, created Laraberg as an easy way for developers building applications with Laravel to integrate the […]

Read more
HeroPress: How the WordPress community helped me find my way

HeroPress: How the WordPress community helped me find my way Este ensaio também está disponível em português. As I make a checklist of all the things I’ll have to pack to travel from São Paulo to Berlin, to attend WordCamp Europe 2019, I can’t stop thinking how hard the path to this point has been. […]

Read more