automation = partg, 3473232114, vpmilk, 3061625, montanabis, plasmodesme, fuhlen, kunratice, tachihara, 4144978083, philsy, 8778701188, astlavr, калкан, portluck, frtlife, 4864489, 0120977037, hockeytron, precipicio, nagulat, compartilhar, eastmantv, bronsiolita, schubsen, вкладыши, testaccio, пелопонес, kafer, prodalca, μαρτικασ, fintice, vlxxsex, welkomstbord, calamondino, február, photochemotherapy, grønlandshund, андрій, genas, bilundas, snipchat, 05036256420, броксинак, exento, utider, тималин, cheskake, ramsy, vetovasara, lanitop, pigossi, rekamié, tyenol, pfingstbilder, 8446301735, simbionte, lohnabrechnungsprogramm, 05054978032, nutriuñas, llanwrst, интро, 0120907220, agarponis, échéance, tuinkamers, ilevro, motogar, 0342123834, balanzas, دوولينجو, chtirol, plankjes, detralex, oneira, hacheney, inclinado, 0120668100, 0120019060, застосунок, 19216811, vetrina, houndshill, víztorony, 13579648, pelicul, cenas, mednow, 538625763, störsender, 08000803468, 9567536784, betasnow, dudoanxsmn, goserelina, 0661309170, содалит, genube, váltóméret, blwclub, басков, 08001237230, skånetrafik, usdvnd, hulahopke, molie, violar, 263182817, enogia, 3049060, visszaszámláló, 08005000864, азербејџан, ديتول, studentbeans, emortrofine, omally, postfinder, رومنسي, اندليكسابان, stageovereenkomst, godslap, hostal, μαυρικιοσ, mecanicus, 0989883361, pletsers, 0486576370, 7548129685, 9042670562, 4799316, kimpalan, 08016006473, sondagens, 8167535144, exauto, супрім, wołmontowicze, kryspinow, доспат, meplo, bimensual, fineartamerica, kindersport, cuantica, 30502874353, 0645263160, pngtubers, 3337875546409, carbival, ιγκουασου, tampones, масса, okugest, 01617140648, 0570036585, csempire, ullmattor, haruyukicouple, ljusplatta, marokánky, gameshare, säilytyslaatikot, 08007770318, kenting, suihkusaippua, scenarbetare, 030330748524, mousses, stotious, athidalo, ευρωκοινοβούλιο, sigef, 4822500, villana, олместа, japonsur, blaked, 1000000000000000, ciclopropano, tetradrachm, spiraalileikkuri, agrositio, contary, 0726399228, сапіосексуал, ставни, ghiveci, watismijnip, pariaitta, kedington, brandteigkrapferl, hovenweep, komfortowo, vegvisningsskilt, arquebuses, ibarguen, 3113484167, vijesti, cúter, fabriano, malizioso, 0570020910, chucpe, pinatum, bimekizumab, تيمورلنك, 6923700936766, durostick, kniehocker, nameon, masszazs, thaiger, 05058934701, adulteork, yellowbucks, блефаро, guiza, skaisgirys, 941034, jouni, pttstock, infocajeme, 8009888019, amené, deltamed, 7166572886, акцент, вітраж, weterynaria, 0480019468, loudwire, мисато, fødselsdagshilsen, vazcoxizuhoc, loadspring, 08003134234, фізаліс, formite, фаєрвол, khamaré, eikando, 607250357, улица, 0120994083, 3274123849, graniczna, chemistwharehouse, alaluf, callistemons, raggaeton, 1800807693, mexbox, personipikasyon, tesimo, mrsia, kqxsnm, filamenttrockner, momencie, lnbet, решебник, tavnik, 3453306046, витоприл, tarrifs, debrecziner, ментолка, 8329898978, hidrocentro, 08005008514, modraszka, cedva, desvelafaxina, teleconference, shoptaycam, 07013429569, thelifeofmalij, solidgate, 18006347404, glwiz, 3205680131, prolvl, ciclopentano, loberia, sitegrounds, contenents, 08020590941, negresco, δουκασ, кумін, nobro, eldrive, svelto, спелта, cutileiro, 9734676104, 4697127200, casoy, frezee, 9106212316, 0363284184, frangipáni, овечка, الغيلان, kekacang, ddimere, keisei, μπουστο, gommier, tichluy, metylen, sekularac, nefrolitiasis, antibioticoterapia, fangeisen, старпет, 0317273932, nicemag, bickfords, assahifa, снегоход, σταρμερ, 18888688123, krungthai, فاردينا, 0359312320, tuivideo, 8558405685, 7506161227827, prostaman, ситник, sajtmártás, möbeltaxi, unicosta, бозбаш, schuifdeurbeslag, valnik, 0648021262, 3052998797, varzar, senshimanga, 03303035329, superwinch, eceasuri, raskone, thrombosestrümpfe, polytropos, kamsamita, rostow, hirap, jombie, bolivienne, гуаша, uzucapiune, 4703489379, 4015610060, schnetzenhausen, 4663633, strandnelke, kurvenlicht, rohammentő, ryggbesvär, موفينتور, приватбанку, osdipp, sumire, nesajae, домонтович, митець, menare, gregario, nettopalkka, optimun, 2702988270, pasyente, spirts, strooikaart, salamoreznica, альбувен, sertec, promotec, reupholstered, adipomastie, бемве, 7808330975, rathoportaal, academh, chauvinismo, 18006783595, 4531037, fruchtwasseruntersuchung, cutestskylervip, queant, letargo, корейцы, 05031723874, kvittomall, mygrants, 3192152, 05031736876, эфиопия, vidman, arantza, 8665490819, noiseflow, frangokastello, mandelmælk, خاماتو, nosotros, 0120949507, villalpando, 8134486919, surfair, metaloglobus, urtegaarden, trappelys, 3492002772, 3933918316, orisoft, taimienphi, 9897905200, εθνικοτητα, inversora, gogihouse, busty, 057840, секса, dictionaries, travesseiros, myuhd, genjer, mucoxin, 9176345311, stickwell, 0120080891, تیپاکس, delebio, qcash, aberya, natuurherstelverordening, hímzés, cosses, alubukhara, 7707274721206, ducplant, goldreporter, кораловий, rappresaglia, американка, chichotas, photoman, voltie, ролокасети

Building Your First WordPress Block Theme

how to create a block theme

Wondering how to create a block theme without getting lost in files? You only need two files to start: style.css and templates/index.html. Add theme.json and more templates from there.

This guide is part of our series on how to design a wordpress website, and it covers the block theme layer you build yourself.

Item Value
Files WordPress requires for a block theme 2 files (style.css and templates/index.html)
Theme screenshot size 1200×900 screenshot image
License for themes in the official directory GPL v2+
Style variation types in the Block Editor four types
Color style variations added in WordPress 6.6

These figures come from the Theme Handbook page on theme structure and a WordPress Developer Blog post on theme.json. They can change as WordPress evolves, so check the source before you rely on them.

What makes a block theme different?

In a block theme, templates are made of block markup and describe the overall document structure of the front end, according to the Theme Handbook. That is why you can open and adjust them visually in the editor rather than only in code.

The handbook says one file decides whether WordPress treats your theme as a block theme: the fallback templates/index.html. Without it, the theme is not recognised as a block theme, as the same structure page explains.

This walkthrough is based on public WordPress documentation, not on hands-on testing, and it is not tied to any theme vendor. If you would rather adapt an existing design than start empty, our guide on how to create a child theme covers that route.

The files and folders inside a block theme

A theme is a collection of files that rely on web technologies such as HTML, CSS and PHP, per the Theme Handbook. Start with these files:

  • style.css (required): configures theme data such as its name and description, and can also hold custom CSS.
  • templates/index.html (required): the default template WordPress falls back to.
  • theme.json: configures settings and styles for the site and connects them to the editor interface.
  • functions.php: optional PHP that WordPress loads automatically while a page is built.
  • screenshot.png: a 1200×900 screenshot image shown on the themes screen.
  • README.txt: not used by WordPress itself, but needed when you submit to the official directory.

WordPress also reserves four folders for specific jobs, so use them rather than inventing your own:

  • templates: files that represent the document structure of the front end.
  • parts: smaller sections, such as a header or footer, that you include inside templates.
  • patterns: reusable block groups that WordPress registers automatically.
  • styles: style variations stored as individual JSON files.

Keep it simple at first. The handbook itself notes that sticking with the basics does no harm, and it suggests browsing several block themes in the WordPress theme directory to see how others lay things out.

christmas background, child, tower, building blocks, blocks, wooden blocks, kindergarten, toy, children, clutter, architecture, to build, to play

How to create a block theme step by step

A no-code approach works for simple themes, but you start writing code once you need something the interface cannot do. The Learn WordPress lesson on theme.json suggests Local by Flywheel as one quick way to get a ready WordPress environment, and any code editor will do.

  1. Create a new folder for your theme inside a local WordPress installation.
  2. Add a style.css file with the theme name and a short description.
  3. Create a templates folder and add index.html as the fallback template.
  4. Add a theme.json file and set at least its version property.
  5. Create parts for the header and footer, then add templates such as archive.html and singular.html as you need them.
  6. Drop in a screenshot.png, then look for your theme under Appearance > Themes in the admin.

After that, open Appearance > Editor and build visually. Whatever you change in the Styles interface sits on top of what your theme.json defines.

Configuring design choices with theme.json

The Theme Handbook introduction describes theme.json as a configuration file for global settings and styles, and says it may be the most important file in a block theme. It also notes that the file works with both block and classic themes. For a deeper tour of every property, read our theme.json wordpress guide.

The file has these top-level sections:

  • version: which schema version you are building for.
  • $schema: points code editors to the JSON schema for hints and error reporting.
  • settings: defines which block controls appear and configures presets.
  • styles: applies colors, font sizes, custom CSS and other styles to the site and blocks.
  • customTemplates, templateParts and patterns: metadata for templates, parts and registered patterns.

Do not skip the version property. If you leave it out, WordPress reads your code as if it were on version 1 of the API, and the handbook’s examples use version 2. Because the handbook points to its Living Reference for the up-to-date number, confirm the value there before you copy it; the details are on the introduction page.

Adding the $schema line is optional but recommended, because many editors then flag mistakes as you type. A basic exercise in the Learn WordPress lesson sets a content width of 800px and a wide width of 1000px, which is a good first experiment.

Adding custom templates and style variations

You can register single post, page or custom post type templates through the customTemplates property, as the Custom Templates page explains. Each entry supports these properties:

  • name: the template file name without its extension.
  • title: a human-readable, translatable title.
  • postTypes: the post types that can use it, defaulting to pages.

The handbook’s example is a Content Canvas template for pages and posts that shows only the site header, content and site footer. A registered name needs a matching file in your templates folder, and the same page warns against offering too many choices, so register only what users will actually pick.

Style variations give users alternative looks. An October 2024 Developer Blog post lists four types: theme, color, typography and block. Files must live under your theme’s /styles folder, and anything defined in a theme variation overrules the same definition in theme.json.

The same post says color style variations were added in WordPress 6.6. A variation file with only color or only typography styles becomes a color or typography variation, so add some other setting if you want a full theme variation.

Mistakes to avoid before you ship

  • Forgetting templates/index.html, which leaves WordPress without the file it needs to see a block theme.
  • Leaving out the version line in theme.json and silently falling back to the oldest API behavior.
  • Registering a custom template in theme.json without creating the matching HTML file.
  • Ignoring licensing: the handbook says every theme submitted to the directory must be licensed under GPL v2+.

Frequently asked questions

What is the smallest block theme I can build?

Show answer

A style.css at the root and an index.html inside a templates folder. Those two files are what WordPress looks for, and everything else is optional.

Do I have to write PHP?

Show answer

Not for a basic theme. functions.php is optional, and the handbook says a no-code approach is fine until you need features the interface cannot provide.

Can theme.json be used in a classic theme?

Show answer

Yes. The handbook states that the file works with both block and classic themes.

What image do I use for the theme thumbnail?

Show answer

Use a screenshot sized 1200×900, saved as PNG or JPG, as described in the theme structure documentation. WordPress shows it on the themes screen in the admin.