1. 1 Required files and file structure (ok)

theme
|__ style.css
|__ functions.php
|__ index.php
|__ theme.json
|__ templates
    |__ index.html
    |__ ...
|__ parts
    |__ header.html
    |__ footer.html

C:\xampp\htdocs\wp-content\themes\emptytheme\style.css

/*
Theme Name: Empty Theme
Theme URI: https://github.com/wordpress/theme-experiments/
Author: the WordPress team
Description: The base for a block-based theme.
Requires at least: 5.3
Tested up to: 5.5
Requires PHP: 5.6
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: emptytheme
Empty Theme WordPress Theme, (C) 2021 WordPress.org
Empty Theme is distributed under the terms of the GNU GPL.
*/

C:\xampp\htdocs\wp-content\themes\emptytheme\functions.php

<?php
if ( ! function_exists( 'emptytheme_support' ) ) :
	function emptytheme_support()  {
		// Adding support for featured images.
		add_theme_support( 'post-thumbnails' );
		// Adding support for core block visual styles.
		add_theme_support( 'wp-block-styles' );
		// Adding support for responsive embedded content.
		add_theme_support( 'responsive-embeds' );
		// Add support for editor styles.
		add_theme_support( 'editor-styles' );
		// Enqueue editor styles.
		add_editor_style( 'style.css' );
		// Add support for custom units.
		add_theme_support( 'custom-units' );
	}
	add_action( 'after_setup_theme', 'emptytheme_support' );
endif;
/**
 * Enqueue scripts and styles.
 */
function emptytheme_scripts() {
	// Enqueue theme stylesheet.
	wp_enqueue_style( 'emptytheme-style', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get( 'Version' ) );
}
add_action( 'wp_enqueue_scripts', 'emptytheme_scripts' );

a

Last updated