How to Add Custom Sections to a Shopify Theme
A well-designed Shopify store needs more than a beautiful homepage. Store owners often want to add unique content layouts, promotional banners, product highlights, testimonials, and other elements that match their brand and business goals. Shopify custom sections make it possible to create these experiences while keeping the storefront flexible and easy to manage.
Shopify sections are reusable content modules that can be added, removed, rearranged, and customized through the theme editor. With the right section structure, merchants can update their store’s content without editing code every time.
In this guide, we will explain how to add custom sections to a Shopify theme, how Shopify Liquid and schema settings work, and how to build sections that are reusable, responsive, and easy to customize.
What Are Shopify Theme Sections?
Shopify theme sections are modular components used to organize and display content on an online store. A section can contain text, images, buttons, product information, videos, or other elements.
For example, a Shopify homepage might include:
- Hero banner section
- Featured collection section
- Image-with-text section
- Customer testimonial section
- Promotional banner
- Product comparison section
- Newsletter signup section
Each section can have its own settings, allowing merchants to customize its appearance and content through the Shopify theme editor.
Shopify Online Store 2.0 themes use JSON templates and section groups to provide greater flexibility when arranging storefront layouts. Sections can be added to supported templates and reordered without directly editing template code.
Why Add Custom Sections to a Shopify Theme?
Many Shopify themes include standard sections, but sometimes their available layouts or settings do not meet your specific requirements.
Custom sections help you extend your theme without rebuilding the entire storefront.
1. Create a Unique Store Design
Custom sections allow you to build layouts that match your brand identity. You can create unique product displays, editorial content blocks, promotional areas, and interactive elements.
2. Make Store Editing Easier
A properly developed custom section includes editable settings in the theme editor. This means store owners can update headings, images, buttons, colors, and other content without changing the code.
3. Improve Customer Experience
Custom sections can help organize product information, highlight important benefits, and guide customers toward relevant products.
4. Reuse Sections Across Pages
A reusable section can be added to multiple supported templates. This helps maintain consistent design while reducing repetitive development work.
5. Support Marketing Campaigns
Custom sections are useful for seasonal promotions, product launches, sale banners, brand stories, and campaign landing pages.
Shopify Sections vs. Blocks: What’s the Difference?
Before creating a custom section, it is important to understand the difference between sections and blocks.
| Feature | Section | Block |
|---|---|---|
| Purpose | Creates a larger content area | Adds smaller elements inside a section |
| Example | Testimonial section | Individual customer testimonial |
| Customization | Section-level settings | Block-specific settings |
| Layout | Can contain multiple blocks | Usually belongs to a section or theme block structure |
| Reusability | Can be used across supported templates | Depends on block type |
For example, a custom testimonial section might contain several testimonial blocks. Each block can include a customer’s name, review, and image.
Shopify supports different block types, including section blocks, theme blocks, and app blocks. Their availability and behavior depend on the theme’s structure.
What You Need Before Creating a Custom Section
Before editing your Shopify theme, prepare the following:
- A Shopify store with access to theme code
- A theme that supports Online Store 2.0 features, preferably
- Basic knowledge of HTML and Liquid
- A text or code editor
- A clear idea of the section’s layout and functionality
You do not need to be an advanced developer to create a simple custom section. However, more complex features may require knowledge of CSS, JavaScript, and Shopify’s theme architecture.
Important: Always duplicate your theme before making code changes. This gives you a backup if something goes wrong.
How to Add a Custom Section to a Shopify Theme
Follow these steps to create a basic custom section.
Step 1: Open Your Shopify Theme Code
- Log in to your Shopify admin.
- Go to Online Store → Themes.
- Find the theme you want to customize.
- Click the three-dot menu.
- Select Edit code.
You will see your theme’s file structure, including folders such as assets, config, layout, sections, snippets, and templates.
Step 2: Create a New Section File
In the code editor:
- Find the Sections folder.
- Click Add a new section.
- Enter a name for your section.
For example:
custom-image-text
Shopify will create a Liquid file inside the sections directory:
sections/custom-image-text.liquid
This file will contain the HTML, Liquid code, and schema settings for your custom section.
Step 3: Add the Section’s HTML and Liquid Code
Let’s create a simple image-and-text section.
Add the following code to your new section file:
<section class="custom-image-text">
<div class="custom-image-text__container">
{% if section.settings.image != blank %}
<div class="custom-image-text__image">
{{
section.settings.image
| image_url: width: 1200
| image_tag: loading: 'lazy'
}}
</div>
{% endif %}
<div class="custom-image-text__content">
{% if section.settings.heading != blank %}
<h2>{{ section.settings.heading }}</h2>
{% endif %}
{% if section.settings.description != blank %}
<div class="custom-image-text__description">
{{ section.settings.description }}
</div>
{% endif %}
{% if section.settings.button_label != blank %}
<a
href="{{ section.settings.button_link }}"
class="custom-image-text__button"
>
{{ section.settings.button_label }}
</a>
{% endif %}
</div>
</div>
</section>
This code creates a section with an image, heading, description, and button.
The content is connected to Shopify’s section settings, so merchants can change it through the theme editor.
Step 4: Add Customization Settings with Schema
The schema defines the settings that appear in the Shopify theme editor.
Add the following code at the bottom of your section file:
{% schema %}
{
"name": "Custom image with text",
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "Section image"
},
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "Discover Our Collection"
},
{
"type": "richtext",
"id": "description",
"label": "Description",
"default": "<p>Introduce your products and brand.</p>"
},
{
"type": "text",
"id": "button_label",
"label": "Button text",
"default": "Shop Now"
},
{
"type": "url",
"id": "button_link",
"label": "Button link"
}
],
"presets": [
{
"name": "Custom image with text"
}
]
}
{% endschema %}
The schema includes several settings:
image_pickerallows merchants to select an image.textallows them to enter a heading or button label.richtextprovides a formatted description field.urlallows them to select a destination link.presetsmakes the section available to add through the theme editor.
Shopify section schemas must contain valid JSON and use supported setting types. A preset is important when you want merchants to add the section directly from the theme editor.
Step 5: Add CSS Styling
To make the section look professional, add styling to your theme’s CSS file.
For example, you can add the following CSS to an existing stylesheet in your theme’s assets folder:
.custom-image-text {
padding: 60px 20px;
}
.custom-image-text__container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px;
align-items: center;
max-width: 1200px;
margin: 0 auto;
}
.custom-image-text__image img {
display: block;
width: 100%;
height: auto;
border-radius: 12px;
}
.custom-image-text__content h2 {
font-size: 36px;
margin-bottom: 20px;
}
.custom-image-text__button {
display: inline-block;
padding: 12px 24px;
background: #222;
color: #fff;
text-decoration: none;
border-radius: 4px;
}
@media screen and (max-width: 749px) {
.custom-image-text__container {
grid-template-columns: 1fr;
gap: 24px;
}
.custom-image-text__content h2 {
font-size: 28px;
}
}
This CSS creates a two-column layout on larger screens and stacks the image and text on mobile devices.
You can adjust the spacing, typography, colors, and alignment to match your store’s design.
Step 6: Add the Custom Section to Your Store
After saving the code:
- Return to Online Store → Themes.
- Click Customize.
- Open the page where you want to add the section.
- Click Add section.
- Search for Custom image with text.
- Add the section.
- Upload an image and update the content.
- Click Save.
Your custom section should now appear on the selected page.
How to Make Custom Sections More Flexible
A basic custom section is useful, but adding more settings can make it easier for merchants to control the layout.
Add Color Settings
You can add a color scheme setting to let merchants choose the section’s background and text colors using the theme’s existing color schemes.
Example schema setting:
{
"type": "color_scheme",
"id": "color_scheme",
"label": "Color scheme",
"default": "scheme-1"
}
Then apply the selected scheme in your section markup:
<section class="custom-section color-{{ section.settings.color_scheme }}">
Make sure the selected color scheme is supported by your theme.
Add Layout Options
You can create settings that allow merchants to choose:
- Image position
- Content alignment
- Section width
- Text alignment
- Desktop and mobile spacing
- Button style
For example, a select setting can allow the merchant to choose whether the image appears on the left or right.
Add Blocks to Your Custom Section
Blocks make your section more flexible by allowing merchants to add multiple content items.
A feature section, for example, could contain multiple feature blocks with an icon, heading, and description.
A simple block schema looks like this:
{
"type": "feature",
"name": "Feature",
"settings": [
{
"type": "text",
"id": "heading",
"label": "Feature heading"
},
{
"type": "text",
"id": "description",
"label": "Feature description"
}
]
}
You would also need to define the block in the section schema and render it using Liquid.
For a section with multiple blocks, Shopify provides the section.blocks collection, which you can loop through to display each block’s content.
Popular Custom Sections You Can Build for Shopify
Here are some useful custom sections you can create for your Shopify store.
1. Custom Hero Banner
A hero banner can include a large image, heading, description, and call-to-action button.
It is useful for highlighting new collections, seasonal campaigns, and featured products.
2. Product Feature Section
This section displays product benefits, specifications, or unique selling points.
It can help customers understand why a product is valuable before making a purchase.
3. Customer Testimonial Section
A testimonial section displays customer feedback and social proof.
You can create individual testimonial blocks so merchants can add, remove, or rearrange customer reviews.
4. Custom Collection Grid
A custom collection grid can display products or collections in a unique layout.
You can customize the number of columns, image ratio, product information, and button styles.
5. Brand Story Section
A brand story section allows merchants to share their business history, values, and mission through images and text.
It can help create a stronger connection between the brand and its customers.
6. Promotional Banner
A promotional banner can highlight discounts, free shipping offers, or limited-time campaigns.
A customizable banner makes it easier to update marketing messages without editing theme code.
7. FAQ Section
A custom FAQ section can organize frequently asked questions into expandable blocks.
This helps customers find information about shipping, returns, product details, and store policies.
Common Problems When Adding Custom Shopify Sections
Custom sections can sometimes cause errors if the code or schema is not configured correctly.
Here are a few common issues and their solutions.
| Problem | Possible Solution |
|---|---|
| Section does not appear in theme editor | Check that the schema includes a valid presets entry |
| Invalid schema error | Validate JSON syntax and setting IDs |
| Image does not display | Check the image setting and Liquid image output |
| Button link is missing | Verify the URL setting and its Liquid reference |
| Section looks broken on mobile | Add responsive CSS and test different screen sizes |
| Theme editor preview does not update correctly | Check JavaScript initialization and theme editor compatibility |
| Custom section cannot be added to a page | Confirm the page template supports sections |
Shopify’s theme editor dynamically updates sections and blocks. Custom JavaScript should account for these updates rather than relying only on scripts that run once when the page initially loads.
Best Practices for Shopify Custom Section Development
To build reliable and maintainable Shopify sections, follow these recommendations.
Keep Your Code Organized
Use clear file names, meaningful CSS class names, and reusable snippets where appropriate.
Organized code makes future customization easier.
Make Sections Responsive
Your custom section should work properly on desktop, tablet, and mobile devices.
Use responsive CSS and test the section at different screen widths.
Optimize Images
Use Shopify’s image filters and appropriate image sizes.
Avoid loading unnecessarily large images, especially on mobile devices.
Avoid Unnecessary JavaScript
Use Liquid and CSS whenever possible for simple layouts and styling.
Add JavaScript only when the section requires interactive behavior.
Use Unique Setting IDs
Each setting inside a section should have a unique ID.
Duplicate setting IDs can cause schema errors and prevent the section from working correctly. Shopify
Test Before Publishing
Always preview the section in the theme editor before publishing it.
Check the layout, links, images, settings, and responsive behavior.
How ThemeTidy Can Help You Build Custom Shopify Sections
Creating custom Shopify sections can help you build a storefront that reflects your brand and supports your business goals.
ThemeTidy focuses on Shopify themes and customization solutions that help merchants create flexible, modern, and user-friendly online stores.
Whether you want to customize your homepage, create unique product sections, improve your product page layout, or add reusable content blocks, the right Shopify theme provides a strong foundation.
A well-structured theme makes it easier to customize your storefront while maintaining responsive design, usability, and performance.
Explore ThemeTidy for Shopify theme solutions and inspiration for building a better online store.
Adding custom sections to a Shopify theme is an effective way to improve your store’s design and functionality.
By using Shopify Liquid, section schema, and reusable blocks, you can create flexible content modules that merchants can manage directly through the theme editor.
Start with a simple section, such as an image-with-text layout or promotional banner. Once you understand how section settings and schema work, you can build more advanced sections with custom layouts, dynamic content, and interactive features.
The key is to create sections that are easy to customize, responsive across devices, and useful for your customers.
With thoughtful development and the right Shopify theme, custom sections can help your store deliver a more engaging shopping experience.
Founder & Shopify Expert
15+ Years of Experience
Ready to Build Your High-Converting Shopify Store?
Get a free store review and custom growth plan from a 15+ year Shopify expert.
Free Store Audit
Detailed analysis of your store performance
Actionable Plan
Step-by-step plan to increase sales & conversions
Expert Support
15+ years of Shopify experience by your side
15+
Years of Experience (Since 2010)
500+
Stores Built Worldwide
$100M+
Revenue Generated for Our Clients*
30+
Countries We Serve