Block Theme (FSE Overview) A Block Theme is a WordPress theme built using blocks and designed for Full Site Editing (FSE). It enables editing the entire site (header, footer, templates, etc.) using the Block Editor instead of traditional PHP templates.
Uses HTML-based templates instead of PHP Powered by theme.json Supports Global Styles Built for Full Site Editing (FSE) Uses block markup (<!-- wp:block-name -->) Core Concepts Theme Structure Basic Folder Structure my-block-theme/ │ ├── style.css ├── functions.php ├── theme.json ├── screenshot.png │ ├── templates/ │ ├── index.html │ ├── single.html │ └── page.html │ ├── parts/ │ ├── header.html │ └── footer.html │ └── assets/ ├── css/ └── js/ Main Stylesheet (style.css) Purpose Required for theme recognition Contains theme metadata Can include global CSS Example /* Theme Name: My Block Theme Theme URI: https://example.com Author: Ashish Verma Description: A custom block theme Version: 1.0 */ body { margin: 0; font-family: sans-serif; } Custom Functionality (functions.php) Purpose Add theme supports Register features Enqueue scripts and styles Example <?php function my_block_theme_setup() { add_theme_support( 'wp-block-styles' ); add_theme_support( 'editor-styles' ); add_theme_support( 'responsive-embeds' ); } add_action( 'after_setup_theme', 'my_block_theme_setup' ); Templates (Block-Based) Example: templates/index.html <!-- wp:template-part {"slug":"header"} /--> <!-- wp:group --> <div class="wp-block-group"> <!-- wp:post-title /--> <!-- wp:post-content /--> </div> <!-- /wp:group --> <!-- wp:template-part {"slug":"footer"} /--> Including Assets (CSS & JavaScript) Example function my_theme_assets() { wp_enqueue_style( 'my-theme-style', get_stylesheet_uri(), [], wp_get_theme()->get( 'Version' ) ); wp_enqueue_script( 'my-theme-script', get_template_directory_uri() . '/assets/js/main.js', [], null, true ); } add_action( 'wp_enqueue_scripts', 'my_theme_assets' ); Global Settings & Styles (theme.json) Purpose Define design system (colors, typography, spacing) Apply global styles across blocks Example { "version": 2, "settings": { "color": { "palette": [ { "name": "Primary", "slug": "primary", "color": "#0073aa" } ] }, "typography": { "fontSizes": [ { "name": "Small", "slug": "small", "size": "12px" } ] } }, "styles": { "color": { "background": "#ffffff", "text": "#000000" } } } Block Patterns What are Block Patterns? Block Patterns are predefined layouts made up of blocks. They can be inserted from the Patterns tab in the editor and then customized.
...