This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
MinimalCode is a WordPress theme for technical blogs. Key features: dark mode with system preference detection, Prism.js code highlighting, reading progress bar, and copy-to-clipboard for code blocks.
Environment: Local WP development site at drunksupport.local
# Check PHP syntax
php -l functions.php
# Validate all PHP files
find . -name "*.php" -exec php -l {} \;
# Access the site
open http://drunksupport.localNo build process - pure PHP/CSS/JS with external CDN dependencies (Prism.js, Google Fonts).
Standard WordPress template structure:
index.php- Main posts loopsingle.php- Individual post displayarchive.php- Category/tag archives404.php- Error page with search and recent postsheader.php/footer.php- Site chrome with dark mode toggle
Three-layer CSS system:
- style.css - CSS variables, base typography, code blocks, theme metadata
- assets/css/custom.css - Layout, components (header, footer, navigation, comments, post cards)
- assets/css/editor-style.css - Gutenberg editor styles
CSS variables in :root and [data-theme="dark"] control theming. All colors reference variables like --bg-primary, --text-primary, --accent.
Four independent modules in an IIFE:
- ThemeManager - Dark mode toggle, localStorage persistence, system preference detection
- SmoothScroll - Anchor link smooth scrolling
- CodeCopyButton - Adds copy buttons to
<pre>blocks - ReadingProgress - Progress bar on single posts (
.single-postclass required)
minimalcode_reading_time()- Calculates read time (200 wpm)minimalcode_social_links()- Returns array from Customizer settingsminimalcode_scripts()- Enqueues Prism.js with language components
- Prism.js 1.29.0 (tomorrow theme) - Code highlighting
- Google Fonts - Inter (body), JetBrains Mono (code)
Supported languages: JavaScript, Python, Bash, JSON, CSS, PHP, TypeScript. Add languages in minimalcode_scripts().
Social links stored as minimalcode_twitter, minimalcode_github, minimalcode_linkedin, minimalcode_email.
Key variables for color modifications:
--bg-primary, --bg-secondary, --bg-code
--text-primary, --text-secondary, --text-tertiary
--accent, --accent-hover
--border-color- PHP 8.0+
- WordPress 6.0+
- Registered nav menus:
primary,social