Templates and static assets
Page templates and asset compilation. Global options and exit codes are on the CLI reference index; concepts are on Page templates and Static Kit.
wonderpress template create
Create a custom page template, its manifest (schemaVersion 1), and delegated Static Kit page assets. --section rows become real PHP render() calls.
| Flag | Description |
|---|---|
--name <Name> | Template name (Landing → template-landing.php). |
--lock <all|insert|false> | Editor lock. |
--section <id:partial> | Composition row, repeatable (hero-main:landing-hero). |
wonderpress template create --name Landing --lock all \ --section hero-main:landing-hero --section quotes:testimonials
wonderpress template list / wonderpress template remove [<Name>]
List templates from .wonderpress/manifest/page-templates/. Remove deletes the PHP file, manifest, and delegated Static Kit JS and SCSS (--no-static keeps the static files).
wonderpress template validate [<Name>]
Check every page-template manifest, or one by name: unknown partials, duplicate ids, bad property types, and composition rows the template PHP does not render. A partial row needs its wonder_partial_props( 'slug', 'id' ) call; a fields row needs wonder_template_composition_field( 'id' ). Commented-out examples from the scaffold are ignored. Also run by wonderpress lint.
wonderpress static compile
Compile the active theme’s Static Kit tree from the environment root. Static Kit still owns that directory; this is a proxy so you do not cd into it.
| Flag | Description |
|---|---|
--watch | Recompile on change (foreground). Cannot combine with --format json. |
--theme <name> | Theme slug for when WordPress is not reachable. |
Not an MCP tool.