A Boilerplate for Wordpress Themes
  • PHP 90.3%
  • JavaScript 6.1%
  • CSS 2.4%
  • PowerShell 1.2%
Find a file
Sid 4cc4a0fc50
Some checks failed
Validate / Asset Lint & Build (push) Has been cancelled
Validate / PHP Analysis & Tests (push) Has been cancelled
Validate / Tag Release (push) Has been cancelled
feat: add opt-in features pattern, status page, navbar, and Calendar feature
- Status page: Gestion menu with Status and Features submenus
- Features: opt-in feature pattern via config/features.php
- FeatureInterface: contract for opt-in feature classes
- Calendar: complete opt-in feature with CPT, template-parts, JS
- Navbar: new sticky top navbar with logo, primary menu, mobile toggle
- sidx_navbar() and sidx_events_grid() wrapper functions
- docs/admin.md, docs/features.md, plan docs
2026-07-03 14:36:53 +02:00
.forgejo/workflows ci: add Forgejo CI workflow for PHP lint, PHPStan, tests, and assets 2026-06-29 16:32:02 +02:00
docs feat: add opt-in features pattern, status page, navbar, and Calendar feature 2026-07-03 14:36:53 +02:00
resources feat: add opt-in features pattern, status page, navbar, and Calendar feature 2026-07-03 14:36:53 +02:00
scripts fix: handle locked files and hidden .git in refresh-test script 2026-07-03 14:05:04 +02:00
src feat: add opt-in features pattern, status page, navbar, and Calendar feature 2026-07-03 14:36:53 +02:00
stubs feat: add opt-in features pattern, status page, navbar, and Calendar feature 2026-07-03 14:36:53 +02:00
tests feat: add opt-in features pattern, status page, navbar, and Calendar feature 2026-07-03 14:36:53 +02:00
theme More templates 2026-06-29 15:21:40 +02:00
.editorconfig feat: add quality tooling -- phpcs.xml, phpstan.neon, .editorconfig 2026-06-29 16:31:23 +02:00
.gitignore chore: gitignore local-instances and boilerplate-tests 2026-07-03 12:33:15 +02:00
.phpunit.result.cache feat: add opt-in features pattern, status page, navbar, and Calendar feature 2026-07-03 14:36:53 +02:00
composer.json test: add test suites for Cleanup, Helpers, Pagination, Icon, and all integrations 2026-07-03 12:04:12 +02:00
design-tokens.json feat: add Design layer — design-tokens.json, Tokens.php, Editor.php 2026-06-29 16:29:04 +02:00
phpcs.xml Fix PHPCS coding standards and PHPStan type safety 2026-06-29 17:40:19 +02:00
phpstan.neon Fix PHPCS coding standards and PHPStan type safety 2026-06-29 17:40:19 +02:00
phpunit.xml test: add PHPUnit tests for Core, Design, and Integration classes 2026-06-29 16:42:12 +02:00
README.md docs: add CONTRIBUTING, deployment, components, security guides; update README 2026-07-03 13:03:59 +02:00
tailwind.base.js feat: add Vite + Tailwind + PostCSS build pipeline configs 2026-06-29 16:33:48 +02:00

SidX WordPress Theme Boilerplate

A high-quality, open source WordPress theme boilerplate by SidX. Distributed as a Composer package with a scaffolded-layers architecture — use what you need, remove what you don't.

Quick Start

Point Composer at the private repo (one-time shell session setup):

$env:COMPOSER_REPOSITORIES='[{"type": "vcs", "url": "https://git.b0t.pm/sid/boilerplate-wp.git"}]'

Then create your theme:

composer create-project sidx/boilerplate my-client-theme
cd my-client-theme
npm install
npm run dev

Credentials: Composer will prompt for your Forgejo username/password. To skip the prompt, add an access token to ~/.config/composer/auth.json:

{ "http-basic": { "git.b0t.pm": { "username": "your-username", "password": "your-forgejo-token" } } }

Principles

  • High code quality — PHPStan level 8, PHPCS/WPCS, ESLint, Stylelint enforced
  • Re-usable components — Navigation, Breadcrumbs, Pagination, and Icon system — all filter-driven and Tailwind-styled
  • Secure by design — Security hardeners run first in the boot sequence, defaults locked down
  • Progressive enhancement — HTML-first, CSS-enhanced, JS-optional. <details>/<summary> accordion, link-based nav
  • No remote dependencies — All fonts, icons, and assets bundled locally. No CDN, no Google Fonts
  • Updatable — Composer-managed dependency; composer update sidx/boilerplate pulls improvements

Architecture

The boilerplate organizes into five independent layers, each implementing SidX\Boilerplate\Bootable:

Layer Contents Required?
Core Security, Setup, Cleanup, Assets (Vite + cachebusting) Always
Design Design tokens JSON → CSS custom properties, editor styles Always
Components Navigation, Breadcrumbs, Pagination, Icon system Optional
Blocks Placeholder for custom Gutenberg blocks (upcoming) Planned
Integrations SCF, WooCommerce, Matomo, FluentForms, MainWP bridges Optional

Plugin Stack (Optional Integrations)

The theme auto-detects these plugins and only loads integration code when the plugin is active:

  • Secure Custom Fields — Automattic's ACF Pro fork
  • WooCommerce — Product gallery support, template overrides
  • FluentSMTP + FluentForms — Theme-styled forms
  • Matomo — Self-hosted analytics tracking
  • MainWP — Child site customizations

Components

Pre-built, Tailwind-styled, filter-driven components:

Core: Navigation, Breadcrumbs, Pagination, Icon
SEO: Meta tags, JSON-LD structured data, XML sitemap
Compliance: Cookie consent banner with category preferences

See docs/components.md for the full API reference.

Build Tooling

  • Vite — Dev server with HMR for CSS/JS
  • Tailwind CSS 3 — Utility-first, scoped to .theme-wrapper (no Gutenberg conflicts)
  • PostCSS — Autoprefixer, RTLCSS (auto-generated RTL), cssnano (minification)
  • Design tokens — Single design-tokens.json → CSS custom properties + Tailwind config

Documentation

  • docs/getting-started.md — LocalWP setup, dev workflow
  • docs/layers.md — Layer architecture, how to disable/remove layers
  • docs/integrations.md — Plugin integration guide
  • docs/conventions.md — Code style, naming, commit conventions
  • docs/components.md — Full component API reference
  • docs/security.md — Security hardening and customization
  • docs/deployment.md — Production deployment guides
  • docs/updating.md — Release process, versioning
  • docs/CONTRIBUTING.md — How to contribute

Requirements

  • PHP 8.2+
  • WordPress 6.5+
  • Composer 2+
  • Node.js 22+

License

MIT