Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Register custom Gutenberg block category
function new_category( $categories, $post ) {
return array_merge(
'slug' => 'custom-category',
'title' => __( 'Custom Category', 'language' ),
add_filter( 'block_categories', 'new_category', 10, 2);
add_filter( 'allowed_block_types', 'allowed_block_types' );
function allowed_block_types( $allowed_blocks ) {
return [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.