Support

Account

Home Forums General Issues register custom GB-block category Reply To: register custom GB-block category

  • 🙄 Of course, I found the solution shortly after the post.

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