Modular Theme Architecture
Shopify Sections and Blocks Explained
The Complete 2026 Guide to Building Flexible, Merchant-Friendly Themes
|
📦 Sections |
🧩 Blocks |
⚙️ App Blocks |
📋 Schema |
|
25+ Sections per Template |
50+ Blocks per Section |
100% Merchant-Editable |
Shopify sections and blocks form the foundational architecture that powers every modern Shopify theme. They represent a fundamental shift in how store owners customize their online presence—moving from code-based customization to visual, modular components that don’t require technical expertise. Understanding this architecture is essential for anyone working with Shopify themes, whether you’re a merchant, developer, or designer.
In 2026, the majority of Shopify store owners expect their themes to support Shopify sections and blocks. This isn’t optional anymore. It’s the standard that merchants have come to rely on. If you’re building or maintaining a Shopify theme—or looking to hire a Shopify developer to help—you need to deeply understand how these components work together.
This guide will walk you through the complete architecture of Shopify sections and blocks, show you practical code examples, explain the best practices that leading theme developers use, and highlight the common mistakes to avoid. By the end, you’ll have everything you need to build flexible, maintainable themes that merchants love to customize.
What Are Shopify Sections and Blocks?
Shopify sections and blocks are the building blocks of modern theme design. To understand them, you need to see how they fit into the broader template architecture. Let’s start with a clear definition of each:
Sections are liquid template files that represent distinct, editable regions of a page. They contain HTML, Liquid markup, CSS, and a schema that defines what settings merchants can customize. Examples include header sections, hero sections, product sections, and collection sections.
Blocks are smaller, nested components within sections that merchants can add, remove, or rearrange. A hero section might contain multiple blocks—one for the background image, one for the headline, one for the CTA button. Merchants can customize each block independently without understanding code.
App blocks are similar to regular blocks but are created by third-party app developers. They follow the same architecture and integrate seamlessly into the theme editor, allowing merchants to add specialized functionality (like reviews, discount apps, or inventory widgets) without custom development.
Schema is the configuration layer that defines what settings are available to merchants. A section’s schema specifies which settings appear in the theme editor, what type of input each setting accepts, and how those settings interact with the theme.
The Architecture Hierarchy
Here’s how Shopify sections and blocks fit into the overall theme architecture:
Layer
Theme Layout
What It Is: Wrapper template file (layout/theme.liquid)
Purpose: Defines overall page structure, header, footer, scripts
Merchant-Editable?: No
Templates
What It Is: Page templates (product.json, collection.json)
Purpose: Define which sections appear on each page type
Merchant-Editable?: Limited (section order)
Sections
What It Is: Section files in /sections directory
Purpose: Reusable, editable page components
Merchant-Editable?: Yes (full customization)
Blocks
What It Is: Nested components within sections
Purpose: Granular controls within sections
Merchant-Editable?: Yes (add/remove/reorder)
This hierarchy is what makes Shopify sections and blocks so powerful. Merchants can control the design and functionality of their pages without touching any code, while developers maintain full control over the underlying structure and capabilities.
How Shopify Sections Work
A Shopify section is fundamentally a reusable template component. Each section lives in the /sections directory and contains three main parts: the Liquid markup (HTML), the CSS styling, and the schema configuration. Let’s break down each component and see how they work together.
Section Files and Structure
Every section file is named with a descriptive slug (hero.liquid, featured-products.liquid) and is stored in the /sections directory of your theme. The file contains Liquid, HTML, CSS, and schema—all in a single file. This modular approach means each section is self-contained and can be developed, tested, and updated independently.
A typical section file structure looks like this:
{{ section.settings.title }}
<div class="hero">
<h1>{{ section.settings.heading }}</h1>
<p>{{ section.settings.subheading }}</p>
{% if section.settings.show_button %}
<a href="{{ section.settings.button_link }}">{{ section.settings.button_text }}</a>
{% endif %}
</div>
<style>
.hero { background: {{ section.settings.background_color }}; }
.hero h1 { color: {{ section.settings.text_color }}; }
</style>
{% schema %}
{
"name": "Hero",
"settings": [
{
"type": "text",
"id": "heading",
"label": "Heading"
},
{
"type": "color",
"id": "background_color",
"label": "Background Color"
}
]
}
{% endschema %}
This example shows the core concept: Shopify sections and blocks merge markup, styling, and configuration into a single, maintainable file. The schema tells the Shopify theme editor what settings to expose to merchants, and the Liquid code uses those settings to render the section.
Section Schema and Settings
The schema is the critical part that makes Shopify sections and blocks work for non-technical merchants. The schema defines:
- Settings: Configuration options merchants can customize (text, colors, images, toggles)
- Blocks: What nested blocks this section can contain and their schema
- Presets: Default configurations for the section
- Locales: Translations and localization strings
For a detailed reference on schema configuration, check the official Shopify sections documentation.
Section Groups
Section groups are a powerful feature that lets you define which sections can appear in specific templates. For example, you might have a section group called “Product Page” that includes product-detail, reviews, and recommendations sections. Only those sections will appear as options when merchants edit a product template.
Section Type
Header
Use Case: Navigation and branding
Common Sections: Announcement bar, logo, menu, cart icon
Hero
Use Case: Page introductions with imagery
Common Sections: Full-width banner, CTA section, image + text
Product
Use Case: Product details on product pages
Common Sections: Product gallery, add-to-cart, options
Collection
Use Case: Product listings
Common Sections: Grid view, filter sidebar, sorting options
Footer
Use Case: Site-wide footer content
Common Sections: Links, newsletter signup, contact info
Content
Use Case: Flexible content sections
Common Sections: Text block, image block, testimonials
Dynamic
Use Case: Display Shopify data dynamically
Common Sections: Featured products, recent orders, collections
Source: Pexels
Understanding Blocks in Shopify Sections and Blocks Architecture
Shopify sections and blocks work together in a parent-child relationship. While sections are top-level page components, blocks are nested elements within sections that merchants can add, remove, and reorder. This combination gives merchants granular control without overwhelming complexity.
Block Types and Structure
Blocks come in different types depending on what data they render. The most common types are:
- Basic blocks: Simple, static content containers
- Product blocks: Display individual products with options
- Collection blocks: Link to or display collections
- Content blocks: Text, images, video, or custom HTML
- Dynamic blocks: Pull data from Shopify resources (products, collections)
Here’s a practical example showing how Shopify sections and blocks work together. This is a carousel section with multiple product blocks:
{% schema %}
{
"name": "Featured Products Carousel",
"blocks": [
{
"type": "product",
"name": "Product",
"settings": [
{
"type": "product",
"id": "product",
"label": "Product"
}
]
}
],
"settings": [
{
"type": "text",
"id": "title",
"label": "Section Title"
}
]
}
{% endschema %}
<h2>{{ section.settings.title }}</h2>
<div class="carousel">
{% for block in section.blocks %}
{% if block.type == 'product' %}
<div class="product-item">
<img src="{{ block.settings.product.featured_image }}" />
<h3>{{ block.settings.product.title }}</h3>
<p>{{ block.settings.product.price }}</p>
</div>
{% endif %}
{% endfor %}
</div>
In this example, merchants can add multiple product blocks to the carousel section. Each block has its own settings (the product picker). The Liquid code loops through all blocks and renders them. This is the power of Shopify sections and blocks: flexible, scalable, merchant-controlled customization.
Block Settings and Configuration
Each block type can have its own settings just like sections. A product block might allow merchants to customize:
- Which product to display
- Text color and background
- Show/hide additional fields (rating, description)
- Button text and link
This is what makes Shopify sections and blocks so merchant-friendly. Instead of modifying code, merchants use the intuitive theme editor to customize their page layouts.
App Blocks — Extending Shopify Sections and Blocks
Shopify sections and blocks aren’t limited to theme developers. Third-party app developers can create app blocks that integrate seamlessly into the theme editor. An app block is simply a block defined by an app instead of the theme. App blocks follow the exact same architecture as regular blocks but are managed by the app developer.
How App Blocks Work
When a merchant installs an app that provides blocks (like a reviews app, discount widget, or inventory tracker), those blocks appear as options in the theme editor. Merchants can add them to compatible sections and customize them using the app’s schema settings.
App developers create blocks by publishing them through the Shopify Partner Dashboard. The app defines the block’s schema, behavior, and styling. When a merchant uses the block, the app handles the rendering and data management.
Integration Benefits
The Shopify sections and blocks architecture makes app integration seamless. Merchants don’t need to install separate integrations or worry about compatibility. They simply add the app block to their sections, configure it, and it works. This has driven adoption of specialized apps across the Shopify ecosystem.
At Ecom Panda, we’ve worked with dozens of apps to integrate their blocks into custom themes. The standardized architecture makes this integration straightforward and reliable.
App Block Best Practices
- Use semantic block names that clearly indicate functionality
- Provide thorough documentation in your schema labels
- Implement responsive design compatible with all devices
- Test blocks in various section contexts before release
- Use CSS namespacing to prevent style conflicts with themes
Shopify Sections and Blocks vs. Snippets vs. Templates
One of the most common questions we get at Ecom Panda is: “What’s the difference between sections, blocks, snippets, and templates?” The answer is critical to understanding Shopify sections and blocks architecture. Let’s compare them:
Component
Section
Purpose: Full-page component with schema
Scope: Page-level, reusable
Merchant-Editable: Yes (full customization)
Best For: Hero sections, product displays, content blocks
Block
Purpose: Nested component within section
Scope: Section-scoped, repeatable
Merchant-Editable: Yes (add/remove/reorder)
Best For: Items within carousels, testimonial slides
Snippet
Purpose: Reusable code include
Scope: Called from templates/sections
Merchant-Editable: No (code-only)
Best For: Shared components, utility functions
Template
Purpose: Page type structure
Scope: Page-wide, type-specific
Merchant-Editable: Limited (section reordering)
Best For: Product pages, collections, home page
The key distinction: Shopify sections and blocks are merchant-friendly, schema-driven components, while snippets are developer utilities for code reuse. Sections and blocks appear in the theme editor; snippets do not.
Source: Pexels
Best Practices for Shopify Sections and Blocks Development
Building high-quality Shopify sections and blocks requires following proven patterns. These best practices come from years of theme development and merchant feedback. Here are the critical ones to master:
1. Organize Settings Into Blocks
Instead of creating a section with dozens of settings, group related settings into blocks. This keeps the theme editor clean and makes it easier for merchants to add multiple instances. A testimonials section should use multiple testimonial blocks rather than a single section with 10+ testimonial inputs.
2. Use Semantic Setting Names
Clear, descriptive names help merchants understand what each setting does. Use “Hero Image” instead of “Image,” “Button Link” instead of “URL,” and “Product Title Font Size” instead of “Size.”
3. Provide Sensible Defaults
Every setting should have a reasonable default value. Merchants should be able to use a section or block immediately after adding it without having to customize every field. Default images, placeholder text, and standard colors make for better user experience.
4. Avoid Over-Granular Blocks
Don’t create a new block type for every small variation. A single “Product” block with optional settings (show/hide rating, description, etc.) is better than separate “Product with Reviews” and “Product Basic” block types.
5. Reference Shopify Best Practices
The official Shopify best practices guide covers performance, accessibility, and merchant experience. Review it regularly when building new sections and blocks.
6. Test Responsiveness Thoroughly
Merchants will use your sections on mobile, tablet, and desktop devices. Every section and block must look good and function properly across all breakpoints. Test with realistic content, not placeholder text.
7. Document Your Schema
Add helpful descriptions to your schema settings. Merchants appreciate knowing what each field does and what values work best. Good documentation reduces support tickets and improves satisfaction.
Common Mistakes with Shopify Sections and Blocks
Even experienced developers make mistakes when working with Shopify sections and blocks. Here are five critical ones to avoid:
1. Creating Sections Without Schema
A section without schema is not merchantable. It won’t appear in the theme editor. Always define a schema with at least one setting so merchants can see and edit the section. This is a foundational requirement for Shopify sections and blocks.
2. Overcomplicating Block Settings
Merchants don’t want 50 options. They want 5 important ones. Limit each block to the settings that merchants actually need. If a setting is rarely changed, hardcode it in the theme instead of exposing it.
3. Ignoring Mobile Responsiveness
Many merchants create sections on desktop and don’t check mobile. Shopify sections and blocks must look good on all devices. Use responsive grids, flexible typography, and test extensively on small screens.
4. Hardcoding Content Instead of Using Settings
If content is hardcoded in the section file, merchants can’t change it without editing the code. Always expose customer-facing content through settings. This is the core principle of Shopify sections and blocks.
5. Not Testing Block Interactions
If a section contains blocks, test adding, removing, and reordering them. Verify that removing all blocks doesn’t break the section layout. Test with many blocks to ensure performance remains good. Ecom Panda always runs comprehensive testing before releasing sections into production.
Ready to Master Shopify Sections and Blocks?
Building and implementing Shopify sections and blocks correctly has profound effects on your store’s flexibility, merchant experience, and long-term maintainability. If you’re looking to build a custom theme that gives your merchants true control—or need help optimizing an existing theme—the right approach to sections and blocks is foundational.
Whether you need a complete custom theme, sections and blocks optimization, or help integrating app blocks, our team at Ecom Panda can help. We specialize in custom Shopify theme development with a focus on merchant-first architecture.
Ready to Build Flexible, Merchant-Friendly Themes?
Get expert guidance on Shopify sections and blocks from our experienced developers.
FAQ: Shopify Sections and Blocks
What’s the difference between a section and a block in Shopify?
Sections are top-level, page-component template files with schema and full customization. Blocks are nested, repeatable elements within sections that merchants can add, remove, and reorder. Sections are merchant-editable page pieces; blocks are granular controls within those pieces.
Can I create custom blocks that work like app blocks?
Yes. Custom blocks created within your theme follow the same architecture as app blocks. They’re defined in the section’s schema and appear as add-able, reorderable components in the theme editor. The difference is that theme blocks are part of the theme code, while app blocks are managed by external apps.
How do I make a section appear in the theme editor?
Every section must have a schema defined. The schema must include at least one setting. Without a schema, the section won’t appear in the theme editor. This is why understanding Shopify sections and blocks schema is critical for theme development.
What happens if I remove all blocks from a section?
That depends on how you’ve coded the section. If your Liquid code only renders content inside the blocks loop, the section will appear empty. This is usually the desired behavior, but you can also provide fallback content or messaging that appears when no blocks are present.
How many blocks can a section contain?
Technically, there’s no hard limit. However, performance degrades with extremely large numbers of blocks. Most themes keep sections to 50 blocks or fewer. If you need more than that, consider breaking the content into multiple section instances.
Can I use CSS to style individual blocks differently?
Yes. Each block has access to its own settings, and you can use those settings to apply different styles. For example, you might have a color setting on each block and apply that color directly to the block’s background via inline styles or Liquid-generated CSS classes.
Conclusion: The Future of Shopify Theme Development
Shopify sections and blocks have fundamentally transformed theme development. They’ve shifted the power from developers to merchants, enabling stores to customize their themes without hiring developers for every small change. Understanding how to build high-quality sections and blocks is non-negotiable for anyone working with Shopify themes in 2026.
The architecture itself—sections for page components, blocks for granular controls, app blocks for extensibility, and schema for merchant customization—creates a powerful foundation for flexible, maintainable themes. When you follow best practices and avoid common mistakes, you’ll build themes that merchants love and that stand the test of time.
If you’re ready to build or optimize Shopify sections and blocks in your store, or if you need help with Shopify development services, we’re here to help. Our team has built hundreds of custom sections and blocks, and we understand what works, what doesn’t, and what merchants need to succeed. Let’s talk about how we can improve your theme.
Related reading: Learn more about Shopify Liquid templating, Online Store 2.0 features, and best practices for Shopify theme customization.