Skip to content

renzojohnson/spartan

Repository files navigation

Spartan

Minimal WordPress starter theme. Clean, fast, zero dependencies. PSR-12 OOP architecture with PHP 8.4.

Features

  • 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 spartan text domain
  • Zero JavaScript, zero dependencies

Templates

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

Architecture

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.

Installation

cd /path/to/wp-content/themes/
git clone https://github.com/renzojohnson/spartan.git

Or download and upload via Appearance > Themes > Add New > Upload Theme.

Requirements

  • WordPress 6.0+
  • PHP 8.4+

Customization

Override CSS variables in your child theme or Customizer additional CSS:

:root {
    --spartan-accent: #e63946;
    --spartan-text: #2b2d42;
    --spartan-bg: #f1faee;
}

Author

Renzo Johnson — WordPress & WooCommerce developer.

Questions or feedback? Get in touch or email renzo.johnson@gmail.com.

License

GPL-2.0-or-later

About

Minimal WordPress starter theme. Clean, fast, zero dependencies. PSR-12 OOP with PHP 8.4.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors