references/debugging.md
A supporting file of the wp-block-themes skill.
Debugging block theme issues
Styles not applying
Fast checks:
- Confirm you edited the active theme (Site Editor → theme).
- Check if user customizations exist (they override theme defaults).
- Validate
theme.jsonstructure (typos can prevent styles from applying). - If a
var(--wp--preset--*)/var(--wp--custom--*)reference is silently using its fallback, the slug is likely un-normalised — WordPress hyphenates digit/letter boundaries and camelCase transitions before emitting the CSS var. Seetheme-json.md§ "Slug normalisation gotcha".
Remember the hierarchy:
- core defaults → theme.json → child theme → user customizations
Templates/parts not showing
- Ensure files are in the correct folders (
templates/,parts/). - Template parts must not be nested in subdirectories.
Style variations not updating
- If a user already selected the variation, the selection is stored in the DB.
- Test with a fresh site/user or reset customizations when appropriate.