Skip to content

WordPress standards

A WordPress theme is a block theme or a classic theme.

A block theme stores templates as HTML made of blocks (templates/*.html, parts/*.html). WordPress renders those blocks. A classic theme uses PHP templates and can still place blocks inside post content.

theme.json holds the palette, type scale, spacing, and layout widths. The editor and the front end both read it. A preset is a CSS variable, var(--wp--preset--color--navy).

block.json is the manifest for one block: name, attributes, and which editor controls stay enabled.

A pattern is registered starter markup, a group of blocks an editor inserts. A pattern is not a new block.

Search commands on these pages use grep. ripgrep (rg) is installed: rg 'pattern' . matches grep -R -n -E 'pattern' .. A one-off Python package runs with uv, which is installed for the user.

Theming

One token source. The editor and the front end resolve the same names.

Styling

One stylesheet system, loaded the same way in the editor and on the front end.

Blocks

Core blocks and patterns first. A custom block is a folder, and plugin calls are guarded.

Code structure

The theme renders. A must-use plugin enforces the environment.

Accessibility

Landmarks, focus, contrast, labels, and an axe scan of the rendered pages.

Each page has the same sections: Principle, Why, How, How to check, Avoid.

Not written yet.

  • Performance
  • Security and hardening
  • Plugins policy
  • Content modelling and editor experience
  • SEO and privacy
  • Environments and content flow
  • Testing and verification
  • Internationalisation
  • Handover and editor docs