Guidance for Claude Code when working in this repository.
daw — the custom WordPress theme behind davidawindham.com,
running since 2004. This git repo covers the theme only
(wp-content/themes/daw), not the full WordPress install. It is a classic
(non-block) PHP theme with a hand-rolled gulp build. Expect cruft: ~22 years of
accumulated pages, libraries, and dead code. Confirm before deleting anything
you didn't write — old code here is often load-bearing in non-obvious ways.
/Users/david/Sites/daw (theme is wp-content/themes/daw)wp on PATH)dw-guten (custom Gutenberg sidebar/metaboxes)Run from the theme directory:
| Command | What it does |
|---|---|
npm run build |
One-shot production build (config: webpack.config.js) |
npm start |
Watch + BrowserSync proxy of https://daw.stu (port 81) |
Webpack compiles everything from npm packages + the bespoke source in src/:
Entry (src/) |
Output | Was (gulp) |
|---|---|---|
legacy-style.js |
v4-style.min.css |
copy+mixin+build |
front.js |
js/v4-front.min.js |
jsf |
main.js |
js/v4-script.min.js |
copy+js |
index.js |
build/index.js |
(seed; block scripts) |
Edit source — src/*.js, css/*.scss/*.css, style.css, js/front-page.js,
and the per-page scripts (js/about.js, js/studio.js, … loaded raw, not bundled),
then npm run build. Vendor JS comes from npm (npm update-able); the two libs with
no clean package (DrawFillSVG, Rainbow) live in src/vendor/. Never hand-edit the
generated v4-*.min.* files — they're clobbered on the next build.
front-page.php,
single.php, archive.php, page-{slug}.php, etc.). Many page-*.php map to
specific pages by slug (about, studio, music, art, contact, desk…).inc/: theme PHP loaded from functions.php —
utils.php, template.php, tweaks.php (always), plus smtp.php, form.php,
analytics.php loaded conditionally. inc/lib/ holds vendored helpers
(Twilio call/SMS, simple_html_dom).header-*.php / footer-*.php: page-specific variants (-home, -studio).dw_scripts() in functions.php — a big
per-page if/elseif ladder keyed on is_page('slug'). Add new page assets there.dw_. Match it..editorconfig is the standard: 2-space indent, LF, UTF-8, final newline,
trim trailing whitespace. (Older files have mixed tabs — follow editorconfig
for new/edited code.)/wik/), injected in wp_footer.Scratch space, plans, and investigation notes live in _claude/ — see
_claude/README.md. Keep generated artifacts and throwaway scripts there, not at
the theme root.
style.css is both the WP theme manifest (header comment) and real CSS —
don't strip the header.img/ and inc/lib/call/auth.php are gitignored (secrets/assets).style.min.css, v4-style.min.css); the theme
enqueues v4-style.min.css. style.min.css is legacy.