小编Bas*_*ele的帖子

WordPress disable gutenberg blocks, but missing reusable blocks

Recently i am busy developing a custom theme for a customer.

Now I am using WordPress and i want to disable specific Gutenberg blocks; than we don't have to support or style every block.

To hide blocks I use the filter hook "allowed_block_types".

<?php

add_filter( 'allowed_block_types', static function ( $original_blocks ): array {
    // Alter the allowed block types:
    // - Disable some core blocks with custom blocks
    // - Each custom block you develop needs to be listed below …

wordpress wordpress-gutenberg

0
推荐指数
1
解决办法
1028
查看次数

标签 统计

wordpress ×1

wordpress-gutenberg ×1