Skip to main content
Login Join
Snippet · PHP

Add Custom Block Pattern Category

Shared by Darshit Rajyaguru · June 15, 2026 · @init

35 views
Back to Snippets

Creates a custom pattern category for reusable block designs.

add_action('init', function(){
        register_block_pattern_category(
            'ai-patterns',
            array(
                'label'=>'AI Generated Patterns'
            )
        );
    }
);
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments