Skip to main content
2 of 4
light grammar touchup
Pat J
  • 12.3k
  • 2
  • 28
  • 36

Digging myself deeper in documentation I got the following result.

There is a way to group your custom blocks around a given category in Gutenberg, and therefore we have the method block_categories. So with a filter you can extend the default categories with custom ones.

Here is my example:

add_filter( 'block_categories', function( $categories, $post ) {
    return array_merge(
        $categories,
        array(
            array(
                'slug'  => 'my-slug',
                'title' => 'my-title',
            ),
        )
    );
}, 10, 2 );

You can find more on this in the provided API.

fefe
  • 894
  • 3
  • 14
  • 34