Minimal WordPress starter theme. Clean, fast, zero dependencies. PSR-12 OOP architecture with PHP 8.4.
- Semantic HTML5 markup (
header,main,article,aside,footer) - PSR-12 compliant, fully OOP with namespaced autoloading
- PHP 8.4 strict types throughout
- Custom logo support
- Two nav menu locations (primary + footer)
- Sidebar widget area
- Block editor support with
theme.json(colors, typography, layout) - Responsive flexbox layout
- CSS custom properties for easy theming
- Translation-ready with
spartantext domain - Zero JavaScript, zero dependencies
| File | Purpose |
|---|---|
index.php |
Fallback / blog listing |
page.php |
Static pages |
single.php |
Single posts with comments |
archive.php |
Categories, tags, dates, authors |
search.php |
Search results |
404.php |
Not found |
header.php |
Site header + navigation |
footer.php |
Site footer |
sidebar.php |
Widget area |
comments.php |
Comment list + form |
spartan/
├── functions.php # Autoloader + bootstrap
├── src/
│ └── Theme.php # Main OOP class (supports, menus, widgets, assets)
├── style.css # Theme header + base styles
├── theme.json # Block editor settings
└── templates... # WordPress template hierarchy
functions.php does two things: registers a PSR-4 autoloader for the Spartan\ namespace, then instantiates Spartan\Theme.
All theme logic lives in src/Theme.php — theme supports, nav menus, widget areas, and asset enqueuing.
cd /path/to/wp-content/themes/
git clone https://github.com/renzojohnson/spartan.gitOr download and upload via Appearance > Themes > Add New > Upload Theme.
- WordPress 6.0+
- PHP 8.4+
Override CSS variables in your child theme or Customizer additional CSS:
:root {
--spartan-accent: #e63946;
--spartan-text: #2b2d42;
--spartan-bg: #f1faee;
}Renzo Johnson — WordPress & WooCommerce developer.
Questions or feedback? Get in touch or email renzo.johnson@gmail.com.
GPL-2.0-or-later