WordPress site editor or block theme file structure

The file structure of a WordPress block theme is the organization and layout of the various files and folders that make up the theme.

This includes template files, stylesheets, JavaScript files, and other assets that are used to create the design and functionality of the theme.

When I start a new theme, I start with the following structure. (Folders in bold)

  • theme-folder 📂
    • assets 📂
      • css 📂
        • main.css 📄
      • images 📂
      • js 📂
    • parts 📂
      • footer.html 📄
      • header.html 📄
    • patterns 📂
    • templates 📂
      • index.html 📄
      • single.html 📄
    • functions.php
    • screenshot.png 📄
    • style.css 📄
    • theme.json 📄

This is sufficient to begin. In some instances, I may deviate.

Read more about the subject above