Sections and blocks
You can use sections in your theme to create the layout that you want for your online store. Sections are made up of different types of blocks that each have a specific function, such as text, buttons, single images, a collage of images, or links.
Sections and blocks provide flexibility in how you arrange your content, and allow you to control the style and feel of your online store without the need to edit code, including the following customization options:
- You can rearrange sections in your templates, and rearrange blocks within sections.
- Sections and blocks can have specific customization settings.
- You can connect compatible sections and blocks to display dynamic information on your online store from custom data, such as adding care instructions for your products. Learn more about connecting dynamic sources.
The sections and blocks that are available in the theme editor depend on your theme and theme version. For example, your theme might have a Slide block that you can add only to a Slideshow section, and a Heading text block that you can add to all of your theme's sections. For more information about which options are available to you, refer to your theme's documentation.
Section and block maximum limits
Sections and blocks have the following maximum limitations:
- Each template can have up to 25 sections.
- Each section can have up to 50 blocks. The exact number of blocks, and the number of each type of block that you can add to each section depend on the section and block sources, and are specified by the theme designer for your theme. For example, if your theme has an Email signup section, then you might only be able to add one Email form block.
- Blocks that support nesting can have up to 8 levels of nested blocks.
On this page
Block sources
Depending on your theme's structure, and the apps that you have installed, your theme might contain a variety of sections that accept blocks from different sources. When you add a block to a section, all available blocks for that section display in the block picker. Depending on your theme and theme version, you can add the following types of blocks to sections in your theme:
- App blocks are blocks that adds functionality to your theme. You can use an app block to reposition areas of your theme added by your installed apps to a specific area of a page in your theme.
- Section blocks are blocks that are defined within a specific section.
- Theme blocks are blocks that are defined within your theme and can have dynamic functionality, such as nesting.
Your theme can contain some sections that use section blocks and other sections that use theme blocks. A single section can accept either theme blocks or section blocks, but not a mixture both.
The availability of app blocks within sections depend on the app's functionality, and whether the section can accept app blocks.
Section blocks
Section blocks are blocks that are designed for a specific section. A section can have limits for the types of section blocks, and limit the number of a certain type of block that you can add.
Example of a section with section blocks
For example, your theme has an Email signup section. You can use this section to add a newsletter signup form so that customers can subscribe to your newsletter. After you add the Email signup section, you can add one of each of the following blocks:
- an Email form block
- a Heading block
- a Subheading block
If you add the Email form block and click + Add block to add another block, then the Email form block no longer displays as an option in the block picker. This limitation helps prevent any issues with capturing the customer's email, and ensures that the customer can easily enter their email address.
If you've added all three of the available blocks for the Email signup section, then the block picker displays a message that all available blocks have been used.
Theme blocks
Theme blocks are blocks that are defined within your theme and can have dynamic functionality, such as nesting. Sections that accept theme blocks can accept a variety of different blocks, depending on the section's structure. A section that accepts theme blocks might accept all available theme blocks, a specific subset of blocks, or blocks unique to that section. Theme blocks might also have the following behaviors:
- Some blocks support nesting, so that you can nest blocks within other blocks up to 8 levels.
- Some sections have required blocks. You can customize or hide these blocks, but you can't re-order or delete them.
- Some blocks display automatically in a section when certain conditions are met.
Example of a section with theme blocks
For example, your theme has a Slideshow section with theme blocks.
In the slideshow section of your theme, when you click + Add block, you can select a Slide block from the block picker. No other block types are available. If you try to add a Slide block to another section in your theme, such as an Image banner section, then Slide isn't available. This is an example of a restricted block.
After you add a Slide block to the Slideshow section, you can click + Add block to add additional blocks to any Slide blocks in the Slideshow section, such as a Heading, Image, Button. These blocks are nested in the Slide. This is an example of a nested block.
If you add a second Slide block to the Slideshow section, then the theme automatically adds a Slideshow controls block. This block displays buttons that visitors to your site can click to navigate from one slide to the another. You can customize the style of buttons or hide the controls, but you can't remove or delete the block. This is an example of a required block that displays conditionally.
Theme block compatibility
To access theme blocks, your theme must have sections that support theme blocks. You can check whether your theme supports theme blocks in your theme's code. If there's a blocks directory in the sidebar of the liquid editor, then you're using a theme that supports theme blocks. You can also check your theme's documentation.
Steps:
From your Shopify admin, go to Online Store > Themes.
Next to the theme that you want to check, click the ... button, and then click Edit Code.
In the sidebar, search for the blocks folder.
Customizing your theme templates with sections and blocks
When you open the theme editor, your store's home page loads by default. You can use the drop-down menu to select a different template, such as products, collections, pages, or blogs, or use the search bar in the template drop-down to search for a specific template. When you select a template, it loads into the theme editor, and any changes you make are previewed in the editor.
Add a section
Add a new section to any page in your online store.
Steps:
Desktop
From your Shopify admin, go to Online Store > Themes.
Find the theme that you want to edit, and then click Customize.
Customize your home page, or click the Home page drop-down menu and then select the template that you want to add a section to.
-
In the sidebar, click the + Add section, and then take one of the following steps:
- Select a section from the list.
- Use the Search sections field to find a specific section, and then select it.
-
Customize your new section by taking any of the following steps:
- Edit the settings and content of your new section.
- Edit the settings and content of the default blocks that load with the section.
- Click + Add block to add a new block.
Optional: To rearrange the order of the sections on your page, hover on the section name and then click and drag the
⋮⋮
icon.Click Save.
iPhone
- From the Shopify app, tap the