Block Pattern Generator
Convert raw HTML or blocks into PHP code to register a Block Pattern.
Block Pattern Configuration
Lowercase, hyphens only
Pattern HTML Content *
Paste your block HTML or Gutenberg block comments
Generated PHP Code
Usage: Add this code to your theme's
functions.php file to register the
block pattern.
Features
- Convert HTML to WordPress block pattern
- Generate register_block_pattern() code
- Support for categories and keywords
- Handles Gutenberg block comments
- Ready to register in functions.php
How to Use
- Enter a unique pattern name (lowercase, hyphens)
- Provide a title and description
- Add categories and keywords for discoverability
- Paste your HTML or Gutenberg block markup
- Click "Generate Pattern Code"
- Copy and paste into your theme's functions.php