Ollie Theme Academy

Curating the Editor Experience

Removing blocks globally

Control block availability using the allowed_block_types_all filter, which accepts either true (show all blocks) or an array of permitted block slugs for granular control.

Choose between deny lists (remove specific unwanted blocks) and allow lists (explicitly define permitted blocks). Deny lists accommodate new blocks automatically while allow lists provide maximum control but require maintenance.

Hybrid approaches work well: use allow lists for core WordPress blocks and deny lists for third-party blocks, providing control over core functionality while accommodating plugin installations.

Avoid unregistering blocks entirely, which can break dependencies and show broken block indicators. Instead, remove blocks from the inserter while keeping them in the registry for compatibility.

Back to: Ollie Theme Academy > Curating the Editor Experience