Theme structure
Placeholder for theme standards, which have never been written down
We ship wp-theme-* repositories, but no theme-specific standards were ever
written. This document exists so the artifact tier is complete and so there is a
single obvious place for that content to land.
Until it is written, themes are bound by everything that is not artifact specific:
- The general standards, in full
- The WordPress platform standards, in full
- Naming files and directories for layout, including the PSR-4 casing rule and the preference for unabbreviated directory names
What is missing and needs writing:
- Where theme PHP lives relative to
functions.php, and howbootstrap.phpapplies to a theme theme.jsonconventions and how far we lean on full-site editing- Block theme versus classic theme expectations
- Which parts of the plugin distribution rules (
.distignoreand friends) carry over
This sits alongside the rest of the outstanding content in what still needs writing.
Related
-
Plugin structure
How a brand plugin is laid out, and why distribution files decide the layout
-
Module structure
The directory layout every module shares, and what ends up in the distributed zip
-
Naming files and directories
Directory and filename conventions, and where they bend to a framework's expectations