Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

795 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Starter Kit theme

GitHub GitHub release (latest by date)

WordPress starter theme with a modern development stack for launching projects faster and easily.

Custom FSE (Full Site Editing) block theme: PSR-4/PSR-12 PHP, Carbon Fields, self-contained Gutenberg blocks, SCSS + Bootstrap 5. Normally used as the application layer of StarterKit Foundation (Docker + IaC + CI/CD), but installs standalone too, see below.

Requirements

How to use

Installation

  1. Create a new theme directory in wp-content/themes:
mkdir you-theme-dir && cd you-theme-dir
  1. Clone Starter Kit Theme:
git clone --depth=1 git@github.com:solidbunch/starter-kit-theme.git . && rm -rf .git
  1. Setup php dependencies:
composer install
  1. Setup node dependencies:
npm install

Build commands

  • Build minified assets for production:
npm run prod
  • Build assets with source maps for development:
npm run dev
  • Start watcher with browser sync for development:
npm run watch

Structure

── config/                      # Base theme configuration
── src/                         # Main theme functionality files
   ├── Base/                    # Base theme functions
   │   └──Hooks.php             # Registering hooks
   │
   ├── Error/                   # Theme additional error handlers, may be enable in config
   ├── Exception/               # Theme additional exceptions
   │
   ├── Handlers/                # Theme hook handlers, main functionality
   │   ├──Blocks/               # Blocks functionality
   │   ├──CLI/                  # WP CLI comands
   │   ├──Meta/                 # Registering meta fields for post types, taxonomis, users etc. Runs by Base/Hooks
   │   ├──PostTypes/            # Registering custom post types with Taxonomies. Runs by Base/Hooks
   │   ├──Settings/             # Theme settings creation.
   │   │  └──ThemeSettings.php  # Main theme settings. Look in wp-admin Theme Settings
   │   ├──Optimization /        # Removes unnecessary things, performance optimization
   │   ├──Security /            # Provides some security options. Disable xmlrpc, etc
   │   ├──Back.php              # wp-admin functions
   │   ├──Front.php             # Basic Front handlers
   │   └──SetupTheme.php        # Setup theme handlers
   │
   ├── Helper/                  # Helpers classes
   │   ├──Assets.php            # Helper to work with assets processed by webpack
   │   ├──Config.php            # Helper functions for theme configuration
   │   ├──Logger.php            # Logging helper
   │   └──Utils.php             # Other useful functions
   │
   ├── Repository/              # Repositories, help to receive data from DB
   │                            # Classes by each post type
   │
   ├── AbstractSingleton.php    # Abstract Class for creating Singleton Classes
   ├── App.php                  # Application Singleton. Entrypoint
   └── dev.php                  # Some developers functions for debug, logging, etc

── blocks/                      # Gutenberg blocks, self-contained (own PHP, templates, styles, assets)
── assets/                      # Theme assets
   ├── build/                   # The compiled assets
   ├── fonts/
   ├── images/
   └── src /                    # Assets source files
       ├── js/
       └── styles/

── parts/                       # Custom template parts for the theme. Include things like headers, footers, and sidebars.
── patterns/                    # Reusable patterns.
── templates/                   # Templates, represent the overall document structure of the front-end.
                                  Templates, parts, patterns are made up of block markup.
                                  WordPress will automatically register files included in this folder.

── functions.php
── package.json
── composer.json
── screenshot.png
── style.css
── webpack.mix.js
── .editorconfig
── .gitignore

Blocks

Overview

Gutenberg Blocks in the blocks/ folder are loaded with the autoloader, create a new block folder with the necessary files and it becomes automatically available, nothing to register by hand.

Each block is a fully self-contained, reusable unit: its own Block.php, templates, styles and assets, independent of the theme. Blocks come in two kinds, static (content saved into post HTML) and dynamic (PHP-rendered on every request from DB/meta data).

Use _StarterBlock as an example to create new blocks. Full guide: blocks/CLAUDE.md.

Documentation

  • CLAUDE.md - architecture, DI container, config system, conventions
  • blocks/CLAUDE.md - block authoring guide (static vs dynamic, folder shape, gotchas)
  • .claude/skills/ - guided workflows: new CPT, new block, FSE → classic conversion
  • StarterKit docs - Foundation-level setup, environments, CI/CD

Stay Connected

Releases

Packages

Used by

Contributors

Languages