A Timber theme with Webpack SCSS compilation, JS bundling, and Browsersync preview, plus some default templates and functions for an Advanced Custom Fields Flexible Content-based CMS config.
- Set up a WordPress install with the Timber plugin
- If using ACF, set up local JSON.
- Download a backup and create a local dev site
- Clone this repo's contents into
wp-content/themes/[your-desired-theme-name] - Delete the
.gitfolder - Do two bulk find-and-replaces in the repo (in file names and contents)
- Replace
THEME-NAMEwith your lowercase theme name, using hyphens for spaces. - Replace
THEME_NAMEthe same way, using underscores for spaces.
- Replace
- Rename
example.env.config.jstoenv.config.jsand changePROXY_TARGETto your local dev site's URL - Create your new theme's git repo with
git init npm run startto develop locallynpm run buildto generate the final theme
The actual, usable WordPress theme is the contents of the build folder. Upload it to your live site.
Be careful not to delete or overwrite the acf-json folder on the server; this folder should be manually downloaded to the root of your local repo whenever you change ACF configuration, but it should never exist in the build folder. The live version of this folder is canonical.
- Document ACF Flexible Content usage and the
fc-handler.twigfile - Document the stuff in
functions.php