Enterprise-grade WordPress theme starter demonstrating professional architecture patterns. Built for developers who want to showcase solid WordPress engineering skills.
Author: Midas Moradi
| Layer | Description |
|---|---|
| OOP PHP | Strict typing, single-responsibility classes, HookableInterface contract |
| PSR-4 Autoloading | Composer autoload + fallback autoloader |
| Service Container | Lightweight DI container with singleton bindings |
| Theme Options | Settings API + Customizer integration |
| CPT Registration | Portfolio post type with taxonomy & meta boxes |
| REST API | Custom wpe/v1 endpoints with validation |
| AJAX Layer | Secure newsletter handler with nonce verification |
| Security Layer | HTTP headers, sanitization, escaping, capability checks |
src/
├── App.php # Bootstrap & service wiring
├── Container/
│ └── Container.php # DI container
├── Core/
│ └── Setup.php # Theme supports, menus, sidebars
├── Security/
│ └── SecurityManager.php # Headers, nonces, helpers
├── Options/
│ └── ThemeOptions.php # Settings API + Customizer
├── Admin/
│ └── ThemeOptionsPage.php
├── PostTypes/
│ └── PortfolioPostType.php
├── Api/
│ └── PortfolioRestController.php
├── Ajax/
│ └── NewsletterHandler.php
└── Assets/
└── AssetManager.php
- WordPress 6.4+
- PHP 8.1+
- Composer (recommended)
- Clone or download this repository
- Copy the theme folder to
wp-content/themes/wp-enterprise-theme-starter - Install dependencies:
cd wp-content/themes/wp-enterprise-theme-starter
composer install --no-dev- Activate the theme in Appearance → Themes
- Go to Appearance → Theme Settings to configure options
- Create a static front page and assign it as homepage
composer install
composer phpcs # Run coding standards
composer phpcbf # Auto-fix coding standardsGET /wp-json/wpe/v1/portfolio?per_page=6&category=web-design
GET /wp-json/wpe/v1/portfolio/{id}
Newsletter subscription via admin-ajax.php:
- Action:
wpe_newsletter_subscribe - Params:
email,nonce - Hook:
wpe_newsletter_subscribed— fires on successful subscription
Available via Appearance → Theme Settings:
- Company name & tagline
- Contact email & phone
- Hero title & subtitle
- Newsletter toggle
Accent color is configurable via Customizer → Enterprise Theme.
- Security headers sent on front-end requests
- All forms/AJAX protected with WordPress nonces
- Input sanitization and output escaping throughout
- REST API access to core
wp/v2requires authentication (customwpe/v1remains public)
Modern 2026 dark theme with:
- CSS custom properties & design tokens
- Fluid typography
- Glassmorphism header
- Gradient hero with grid overlay
- Responsive mobile navigation
prefers-reduced-motionsupport- Block editor support via
theme.json
Midas Moradi — GitHub
GPL v2 or later. See LICENSE.