Thank you for your interest in contributing to Elayne! This guide provides technical information for developers who want to extend or contribute to the theme.
- WordPress 6.6+ required
- PHP 8.0+ required
- Full Site Editing (FSE) compatible
- Block theme architecture
- Elayne Blocks plugin (optional, for enhanced functionality)
For developers who want to contribute or extend the theme:
# Clone the theme repository
cd wp-content/themes/
git clone https://github.com/imagewize/elayne.git
# Or download from GitHub releases
# https://github.com/imagewize/elayne/releases
# Activate via WordPress admin: Appearance → Themes → Elayne → Activate# Clone the plugin repository
cd wp-content/plugins/
git clone https://github.com/imagewize/elayne-blocks.git
# Activate via WordPress admin: Plugins → Elayne Blocks → Activate- Translation Ready: Full internationalization support
- Modern PHP 8.0+: Clean, well-documented code
- Child Theme Support: Extend without modifying core
- No Build Required: Works out of the box
- Custom Pattern Categories: Organized pattern library
elayne/
├── assets/
│ ├── fonts/ # Open Sans and other fonts
│ ├── images/ # Theme images and logos
│ └── styles/ # Block-specific styles
├── languages/ # Translation files
├── parts/ # Template parts (header, footer)
├── patterns/ # Block patterns (65 content patterns)
│ ├── images/ # Pattern-specific images
│ │ ├── legal/ # Legal vertical images
│ │ └── spa/ # Spa/wellness vertical images
│ ├── legal-*.php # Legal industry patterns
│ ├── spa-*.php # Spa/wellness industry patterns
│ └── *.php # General patterns
├── templates/ # Page templates (index, single, page)
├── functions.php # Theme setup and functionality
├── style.css # Theme stylesheet and metadata
└── theme.json # Global styles and settings
Elayne registers custom image sizes optimized for various layouts:
- Portrait Small (380×570) - 2:3 aspect ratio
- Portrait Medium (380×507) - 3:4 aspect ratio
- Portrait Large (380×475) - 4:5 aspect ratio
- Single Hero (700×400) - 16:9-ish landscape
Elayne registers custom pattern categories for better organization:
- Hero - Hero sections and banners
- Features - Feature showcases and service displays
- Call To Action - CTAs and conversion-focused patterns
- Testimonials - Client testimonials and reviews
- Team - Team member displays
- Statistics - Stats and metrics displays
- Contact - Contact forms and information
- Cards - Card-based layouts
- Events - Event listings and displays
- Portfolio - Portfolio showcases and case studies
- Pages - Full page layouts (pre-launch, maintenance)
- Posts - Blog-related patterns
- Shop - E-commerce and product displays
Elayne includes 32 interactive block styles organized into 4 categories:
- Button Effects (6 styles) - Arrow Slide, Gradient Shift, Shimmer, Glow, Border Draw, Slide Up
- Card & Group Effects (7 styles) - Elevate on Hover, Glow Border, Image Zoom, Tilt Card, Scale Hover, Border Pulse, Slide Border
- Image Effects (9 styles) - Zoom Hover, Grayscale to Color, Rotate Icon, Blur, Brightness, Sepia, Lift Shadow, Border Reveal, Tilt 3D
- Text & Link Effects (10 styles) - Animated Underline, Gradient Text, Highlight Fade, Link Hover Shift, and more
All effects are implemented with these considerations:
- Pure CSS: Zero JavaScript for maximum performance
- Hardware-accelerated: Uses
transformandopacityfor smooth 60fps animations - Accessibility: Respects
prefers-reduced-motionmedia query - Print-optimized: Effects disabled for clean printing (
@media print) - Browser compatibility: Works across all modern browsers (Chrome, Firefox, Safari, Edge)
Effects are registered as block styles in functions.php and styled in assets/styles/ directory.
When creating patterns with multi-column content (team members, features, products, etc.), use grid layout with minimumColumnWidth for proper responsive behavior:
CORRECT - Using grid:
<!-- wp:group {"align":"wide","layout":{"type":"grid","minimumColumnWidth":"300px"}} -->
<div class="wp-block-group alignwide">
<!-- wp:group -->
<div class="wp-block-group">...content...</div>
<!-- Automatically adjusts: 3 cols (desktop) → 2 cols (tablet) → 1 col (mobile) -->AVOID - Using columns:
<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide">
<!-- wp:column -->
<div class="wp-block-column">...content...</div>
<!-- Creates cramped 3-column layout on tablets -->Choosing minimumColumnWidth values:
- 280px-300px: Smaller cards (product images, compact text)
- 320px: Medium feature cards with icons and descriptions
- 20rem (320px): Larger pricing cards with extensive content
For patterns with full-width backgrounds (align="full"), apply horizontal padding to the outer container:
- Standard padding:
var:preset|spacing|medium(~24px on mobile) - Apply to outer group with
backgroundColor, NOT inner nested groups - For Cover blocks: Apply padding to
wp:cover, NOT innerwp:group
Example:
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|medium","left":"var:preset|spacing|medium"}}},"backgroundColor":"custom-background"} -->
<div class="wp-block-group alignfull has-custom-background-background-color has-background">
<!-- Inner content without additional padding -->
</div>
<!-- /wp:group -->When creating patterns for specific industries:
-
Naming Convention: Use prefix format:
{industry}-{pattern-type}.php- Examples:
legal-hero.php,spa-services.php,legal-testimonials.php
- Examples:
-
Image Organization: Store images in
patterns/images/{industry}/- Legal:
patterns/images/legal/ - Spa:
patterns/images/spa/
- Legal:
-
Pattern Metadata: Include industry in pattern categories
/** * Title: Legal Hero Section * Slug: elayne/legal-hero * Categories: hero */
-
Color Schemes: Consider industry-appropriate colors from style variations
- Legal: Professional neutrals (Ink & Sand, Gray & Gold)
- Spa: Calming tones (Spa & Wellness variation)
Elayne supports multiple style variations defined in styles/ directory. Each variation includes:
- Color palette definitions
- Typography settings (font families, sizes, line heights)
- Spacing scale
- Shadow presets
To create a new style variation:
- Create a new JSON file in
styles/directory - Define color palette, typography, and spacing
- Theme.json will automatically detect the new variation
The theme.json file controls:
- Settings: Available tools in the editor (colors, typography, spacing)
- Styles: Default styling for blocks and elements
- Custom templates: Template definitions
- Custom template parts: Header, footer definitions
Refer to WordPress Theme.json Documentation for detailed configuration options.
Elayne is translation-ready. All user-facing strings use WordPress internationalization functions:
__( 'Text', 'elayne' ) // Translate text
_e( 'Text', 'elayne' ) // Echo translated text
esc_html__( 'Text', 'elayne' ) // Escape and translateTranslation files are stored in languages/ directory.
- Follow WordPress Coding Standards for PHP, HTML, CSS, and JavaScript
- Use WordPress core functions when available
- Maintain semantic HTML markup
- Ensure all patterns are accessible (WCAG 2.1 Level AA)
- Test patterns across multiple viewport sizes
Elayne enforces strict pattern quality standards through automated GitHub Actions workflows. All pull requests and pushes to main automatically run compliance checks.
Automated Checks:
- ✅ No hardcoded CSS values - Use semantic variables from
theme.json(e.g.,var:preset|spacing|medium) - ✅ No spacer blocks - Use semantic
blockGapon parent containers instead - ✅ No emoji icons - Use SVG icons for visual consistency
- ✅ Proper margin reset - Full-width patterns must include
"margin":{"top":"0","bottom":"0"} - ✅ Responsive grid layouts - 3+ column patterns must use grid with
minimumColumnWidth, notwp:columns - ✅ No hardcoded media IDs - Pattern images must use template functions, not database IDs
- ✅ No HTML comments between blocks - Only WordPress block comments allowed (prevents validation errors)
CI/CD Integration:
- Pattern compliance workflow:
.github/workflows/pattern-compliance.yml - WordPress.org theme review:
.github/workflows/theme-check.yml - Only checks modified patterns - existing non-compliant patterns won't block PRs
- New or edited patterns must pass compliance before merging
- Pull requests cannot merge if compliance checks fail
- View detailed error messages in the GitHub Actions tab
Running Checks Locally:
The compliance checker is embedded in the GitHub Actions workflow. To run checks before committing:
# From theme root directory
# Requires PHP 8.0+
# Quick test - shows which patterns have issues
grep -l "wp:spacer" patterns/*.php
grep -l '"id":[0-9]' patterns/*.php
# Full compliance check
# Copy the PHP checker script from .github/workflows/pattern-compliance.yml
# and run it against your patterns directoryCommon Compliance Issues:
- Hardcoded spacing: Use
var:preset|spacing|mediuminstead ofpadding:24px - Spacer blocks: Replace
<!-- wp:spacer -->withblockGapon parent group - Media IDs: Use
<?php echo esc_url(get_template_directory_uri()); ?>/patterns/images/file.webp - Columns for grids: Use
{"layout":{"type":"grid","minimumColumnWidth":"20rem"}}for 3+ columns - Missing margin reset: Add
"margin":{"top":"0","bottom":"0"}toalignfullgroups with backgrounds
See CLAUDE.md for detailed pattern development guidelines and best practices.
Before submitting patterns or modifications:
- Test in WordPress Site Editor
- Verify responsive behavior (mobile, tablet, desktop)
- Check accessibility (keyboard navigation, screen readers)
- Validate HTML markup
- Test with default style variation
- Test with at least 2 additional style variations
- Ensure images are optimized (WebP format preferred)
- Verify pattern appears in correct category
- Support: imagewize.com/support
- Documentation: imagewize.com/resources/elayne
- Website: imagewize.com