Shopify Theme Development Best Practices for 2026
Shopify themes have evolved significantly with Online Store 2.0. The days of rigid templates with hardcoded content are over. Modern themes use sections everywhere, JSON templates, metafields, and app blocks that give merchants unprecedented customization power. This guide covers the architecture, development patterns, and performance practices that define professional Shopify theme development in 2026.
Key Takeaways
- Online Store 2.0 uses JSON templates with sections everywhere, replacing rigid Liquid template files
- Sections and blocks provide a component architecture that merchants customize through the theme editor
- Performance optimization focuses on critical CSS, lazy loading, responsive images, and minimal JavaScript
- The Dawn reference theme provides the architectural foundation for most custom themes
- Theme Check, Lighthouse, and automated testing ensure quality before deployment
Online Store 2.0 Architecture
JSON Templates vs Liquid Templates
Legacy themes used Liquid template files (e.g., templates/product.liquid) containing hardcoded layout and sections. Online Store 2.0 replaces these with JSON template files that reference sections:
| Aspect | Legacy (Liquid) | Online Store 2.0 (JSON) |
|---|---|---|
| Template format | .liquid files with HTML/Liquid | .json files referencing sections |
| Section placement | Fixed sections hardcoded in template | Sections added/removed via editor |
| Merchant control | Limited to section settings | Full page composition |
| Content reuse | Manual duplication | Shared sections across templates |
| App integration | Theme modification required | App blocks in sections |
Template Structure
JSON templates define the sections that compose a page:
A templates/product.json file lists section references with their type, settings, and display order. Merchants can add, remove, and reorder sections through the theme editor without touching code.
Sections Everywhere
The "sections everywhere" paradigm means any page can use any section:
- Product pages: Product info, reviews, related products, FAQ, custom content
- Collection pages: Product grid, filters, banner, featured products
- Pages: Any combination of text, images, video, forms, custom HTML
- Blog posts: Article content, author bio, related posts, newsletter
Each section defines its own schema (settings, blocks, presets) that appears in the theme editor.
Section Development
Section Architecture
A well-structured section includes:
| File | Purpose |
|---|---|
sections/{name}.liquid | Section markup with Liquid/HTML |
| Schema (within section) | JSON schema defining settings and blocks |
assets/{name}.css | Section-specific styles |
assets/{name}.js | Section-specific JavaScript (if needed) |
Schema Design
Design section schemas for maximum merchant flexibility:
Settings: Global configuration for the entire section (background color, padding, width, heading text).
Blocks: Repeatable sub-components within the section. A testimonial section might have "testimonial" blocks, each with name, quote, and image settings.
Presets: Default configurations that appear in the "Add section" picker in the theme editor.
Best Practices for Sections
- Keep sections focused on a single purpose (do not combine hero + testimonials + CTA in one section)
- Provide sensible defaults for all settings so sections look good out of the box
- Use block limits to prevent performance issues (e.g., max 12 blocks in a slider)
- Include responsive breakpoint settings for layout customization
- Document settings with clear labels and info text in the schema
Liquid Development Patterns
Performance Patterns
Critical CSS inlining: Inline above-the-fold CSS in the document head to avoid render-blocking stylesheets. Defer non-critical CSS with media="print" and an onload handler.
Responsive images: Use Shopify's image_url filter with width parameters and srcset for responsive delivery:
The img_url filter generates sized versions. Provide multiple sizes via srcset and let the browser choose the appropriate resolution.
Lazy loading: Apply loading="lazy" to all images below the fold. First viewport images should use loading="eager" and fetchpriority="high".
Component Patterns
Render snippets for reusable components: Extract repeated markup into snippets (partials) in the snippets/ directory. Pass data through render parameters.
Localization: Use Liquid's t filter for all user-facing text. Store translations in locales/{locale}.json files. Support all languages your target merchants need.
Accessibility: Include ARIA labels, proper heading hierarchy, keyboard navigation support, and sufficient color contrast. Test with screen readers and keyboard-only navigation.
Metafield Integration
Metafields extend Shopify's data model. Use them in themes for:
- Custom product specifications (materials, dimensions, care instructions)
- Collection banners and descriptions
- Page-specific SEO fields
- Product badges and labels
- Color swatches and custom variant displays
Access metafields in Liquid: product.metafields.custom.specification
Dawn Theme Architecture
Why Start with Dawn
Dawn is Shopify's reference theme and the recommended starting point for custom development:
- Performance optimized: Consistently scores 90+ on Lighthouse
- Online Store 2.0 native: Full sections everywhere support
- Minimal JavaScript: Uses vanilla JS, no jQuery dependency
- Accessible: WCAG 2.1 Level AA compliant
- Well-documented: Extensive code comments and documentation
Customizing Dawn
Common Dawn customizations:
| Customization | Approach |
|---|---|
| Color scheme | Modify CSS custom properties in base.css |
| Typography | Update font settings in settings_schema.json |
| Layout modifications | Edit section Liquid and CSS |
| New sections | Create in sections/ following Dawn patterns |
| Custom functionality | Add JavaScript modules in assets/ |
Beyond Dawn
For themes requiring significantly different architecture:
- Start from scratch: When Dawn's assumptions conflict with your design
- Use a different base: Commercial themes like Impulse, Prestige, or Turbo
- Hydrogen: When headless architecture is required (see separate guide)
App Blocks and Extensions
Theme App Extensions
App developers build theme extensions that merchants install without editing theme code:
- App blocks: Components that merchants add to any section's block list
- App embed blocks: Global elements (chat widgets, announcement bars) added through the theme editor
- Snippets: Code injected into specific theme locations
Supporting App Blocks in Your Theme
Ensure your theme supports app blocks:
- Include the
{% content_for 'blocks' %}tag in relevant sections - Define app block support in section schemas
- Test with common Shopify apps (reviews, loyalty, upsell)
- Handle graceful fallbacks when app blocks are absent
Testing and Quality Assurance
Theme Check
Theme Check is a Shopify linter that catches common issues:
Run shopify theme check against your theme to identify:
- Liquid syntax errors
- Performance anti-patterns (large images, synchronous scripts)
- Accessibility issues (missing alt text, heading hierarchy)
- Translation missing for required strings
- Deprecated Liquid tags and filters
Automated Testing
| Tool | What It Tests | When to Run |
|---|---|---|
| Theme Check | Liquid quality, accessibility, performance | Every commit |
| Lighthouse | Page speed, accessibility, SEO | Before deployment |
| Visual regression | Screenshots comparison across changes | Before deployment |
| Cross-browser | Chrome, Firefox, Safari, Edge rendering | Before release |
| Device testing | Mobile, tablet, desktop layouts | Before release |
Development Workflow
- Local development: Use Shopify CLI for hot-reloading development
- Version control: Git with branching for features and fixes
- Pull request review: Code review with Theme Check validation
- Staging: Deploy to a development store for testing
- Production: Push to the live theme after approval
Performance Targets
| Metric | Target | How to Measure |
|---|---|---|
| Lighthouse Performance | 90+ | Chrome DevTools Lighthouse |
| LCP | Below 2.0s | Chrome DevTools / PageSpeed Insights |
| CLS | Below 0.05 | Chrome DevTools / PageSpeed Insights |
| INP | Below 150ms | Chrome DevTools / PageSpeed Insights |
| Total page weight | Below 1.5 MB | Chrome DevTools Network tab |
| HTTP requests | Below 50 | Chrome DevTools Network tab |
ECOSIRE Theme Development Services
Building a custom Shopify theme requires expertise in Liquid, performance optimization, and the Shopify ecosystem. ECOSIRE's Shopify custom theme development services deliver themes that meet performance targets while providing the merchant customization power of Online Store 2.0. Our speed optimization services also improve existing themes that have accumulated performance debt.
Related Reading
- Shopify Theme Customization Guide
- Shopify Page Speed Optimization Guide
- Shopify App Development Guide
- Headless Shopify with Hydrogen
- Shopify SEO Checklist 2026
Should I build a custom theme from scratch or customize an existing theme?
For most projects, customize Dawn or a commercial theme. Building from scratch only makes sense when your design requirements are fundamentally incompatible with existing theme architecture. Customizing a proven base saves 40-60% of development time and ensures you start with tested, accessible, performant code.
How long does it take to develop a custom Shopify theme?
A full custom theme (based on Dawn or another base) typically takes 4-8 weeks for an experienced developer. A theme from scratch takes 8-16 weeks. Timeline depends on the number of custom sections, design complexity, and integration requirements.
Do I need to know React to build Shopify themes?
No. Shopify themes use Liquid (Shopify's templating language), HTML, CSS, and vanilla JavaScript. React knowledge is only needed for Hydrogen headless storefronts or Shopify app development. Liquid is closer to Jinja2 or Twig than React.
Written by
ECOSIRE Research and Development Team
Building enterprise-grade digital products at ECOSIRE. Sharing insights on Odoo integrations, e-commerce automation, and AI-powered business solutions.
Related Articles
AI Personalization for eCommerce: Individualized Experiences That Convert
Deploy AI personalization for eCommerce with product recommendations, dynamic content, personalized search, and customer journey optimization for 15-30% higher conversions.
Headless Shopify with Hydrogen: Build High-Performance Custom Storefronts
Complete guide to building headless Shopify storefronts with Hydrogen framework covering Remix, Storefront API, Oxygen hosting, and performance optimization.
Building Mobile-First Shopify Stores: Complete Optimization Guide
Build mobile-first Shopify stores that convert. Covers theme selection, mobile UX, checkout optimization, app performance, and Shopify-specific mobile strategies.