Files and folders structure
Top‑level files
- style.css — Theme base stylesheet.
- theme.json — Global styles & Gutenberg settings.
- functions.php — Theme bootstrap; registers supports, loads classes.
- Template entry points: index.php, single.php, page.php, archive.php, search.php, author.php, 404.php, header.php, footer.php.
- Woo template loader: woocommerce.php — Prepares context and loads Woo Twig templates.
- Build tooling: webpack.config.js, package.json, composer.json.
- Coding standards: phpcs.xml, twig_cs.php, prettier.config.mjs, stylelint.config.mjs, .eslintrc.cjs, .editorconfig.
- Misc: screenshot.jpg, README.md.
Directories
inc/— PHP source (namespacedChisel\\...). Key subdirs:inc/WP/— Core WP integration: assets, blocks, AJAX, etc. Example:inc/WP/Assets.php,inc/WP/AjaxEnpoints.php,inc/WP/Blocks.phpinc/Plugin/— Plugin integrations. Examples:inc/Plugin/Woocommerce.php,inc/Plugin/GravityForms.phpinc/Controllers/— Controllers for routes/AJAX. Example:inc/Controllers/AjaxController.phpinc/Helper/— Helper utilities. Examples:inc/Helper/WoocommerceHelpers.php,inc/Helper/GravityFormsHelpers.phpinc/Factory/— Factories/registrars (e.g., blocks). Example:inc/Factory/RegisterBlocks.php
src/— Theme source assets (authored code):src/scripts/— JS modules and entrypoints. Examples:src/scripts/modules/utils.js,load-more.js,slider.jssrc/styles/— SCSS organized by layers (elements/objects/etc.). Examples:src/styles/elements/_form.scss,src/styles/objects/_grid.scss- Blocks source (native or ACF) compiled by build system (final assets land in
build/).
views/— Twig templates (rendered via Timber):views/*.twig— Page and layout templates.views/components/*— Reusable components/partials (e.g., post item, pagination).views/woocommerce/*— WooCommerce templates (archive-product.twig, single-product.twig, content-product.twig, etc.).
assets/— Static design assets used at build time:assets/fonts/— Webfonts (.woff2).assets/icons/andassets/icons-source/— Built SVG sprite and sources.assets/images/— Theme images.assets/hashes.php— Build hash map (autogenerated).
build/— Compiled output fromnpm run build:build/scripts/*.js— JS bundles (frontend, admin, editor, login).build/styles/*.js|*.asset.php— Enqueued style entrypoints (includinggravity-forms,woocommerce,main).build/blocks*/— Compiled blocks (block.json, index.js, view.js).- Note: PHPCS excludes
build/.
acf-json/— Exported ACF field groups for sync.patterns/— Block patterns for the editor.languages/— Translation files (empty by default)..vscode/— Workspace settings/tasks for VS Code.node_modules/andvendor/— Dependencies (created in devcontainer, mounted as volumes).
Where to add things
- PHP logic:
inc/under the appropriate layer:- WP internals →
inc/WP/ - Plugin integrations →
inc/Plugin/ - Reusable helpers →
inc/Helper/ - Routes/AJAX controllers →
inc/Controllers/
- WP internals →
- JS:
src/scripts/(create a module inmodules/and import from entry as needed). - SCSS:
src/styles/(follow existing layer conventions). - Twig:
views/andviews/components/; Woo views inviews/woocommerce/. - Assets (icons/fonts/images):
assets/(sources), then rebuild. - Blocks: Copy / paste exisiting block end modify to your needs. Sources go under
src/and build tobuild/.