WordPress starter theme for a modern development workflow
Make sure all dependencies have been installed before moving on:
themes/your-theme-name/ # → Root of your theme
├── blocks/ # → Custom blocks
├── config/ # → Theme configuration files
│ ├── bindings.php # → Theme container bindings
│ ├── block-patterns.php # → Custom block patterns
│ ├── block-styles.php # → Custom block styles
│ ├── blocks.php # → All enabled blocks
│ └── browsersync.json # → Developer-specific configuration for BrowserSync (if wanted)
├── includes/ # → Theme functions and classes
│ └── classes/ # → Theme classes (autoloaded)
│ ├── Contracts/ # → Interfaces and Traits
│ ├── Editor/ # → Editor specific classes
│ ├── Blocks.php # → Registration of custom blocks
│ ├── Patterns.php # → Block pattern management
│ ├── Styles.php # → Block styles management
│ └── Tools/ # → Various tools used throughout the theme
│ └── Svg.php # → Allows manipulating SVGs and inlining them
│ ├── Enqueue.php # → Theme assets
│ └── Setup.php # → Theme setup
│ └── template-tags/ # → Theme template tags
│ ├── autoload.php # → Theme autoloader
│ ├── compat.php # → Theme compatibility
│ └── theme.php # → Theme mini container
├── dist/ # → Built theme assets (never edit)
├── parts/ # → Theme partial template files
├── patterns/ # → Theme block pattern template files
├── node_modules/ # → Node.js packages (never edit)
├── src/ # → Theme assets and templates
│ ├── css/ # → Theme stylesheets
│ ├── fonts/ # → Theme fonts
│ ├── img/ # → Theme images
│ ├── js/ # → Theme javascript
│ ├── svg/ # → Theme SVGs
├── templates/ # → Theme custom template files
├── functions.php # → Theme bootloader
├── package.json # → Node.js dependencies and scripts
├── screenshot.png # → Theme screenshot for WP admin
├── style.css # → Theme meta information
Edit app/Setup.php
to enable or disable theme features, setup navigation menus, post thumbnail sizes, and sidebars.
- Run
npm install
from the theme directory to install dependencies
npm run watch
— Compile assets when file changes are made, start Browsersync sessionnpm run build
— Compile assets for production