Sections and blocks
You can use sections in your theme to create the layout that you want for your online store. Most sections are made up of blocks that have a specific function, such as text, buttons, single images, a collage of images, or links. Using sections and blocks in your templates provides flexibility in how you arrange your content, enabling you to control the style and feel of your online store without the need to edit code. Each template can have up to 25 sections.
Each section has a specific variety of blocks that you can add to it. You can add up to 50 blocks per section. The sections and blocks that are available depends on your theme. For more information about which options are available to you, refer to your theme documentation.
Some sections have limits on the number of blocks that you can add, or limits on the number of blocks of a certain type. For example, the Image with text section displays only the blocks specified by the theme designer for your theme. In Dawn, the free Shopify theme, you can add only one of each of the following blocks to the Image with text section:
- a Heading block
- a Text block
- a Button block
- a Caption block
You can further customize the Image with text section with the following options:
- add an image and set its size
- select an animation style for your image
- choose the alignment for the content of your blocks
- set a color scheme for the section
If you reach the limit on the number of blocks that you can add, then the Add block option in the theme editor is greyed out and you can't click or tap it. For example, in the Image with text section in Dawn theme, if you've added a Heading block, a Text block, a Button block, and a Caption block, then Add block (4/4) displays, because you've already added all 4 blocks that are available in the Image with text section.
If the sections that you add to your store layout don't include the settings or options that you need, then you can edit your theme code or contact your theme's developer for support.
On this page
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 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 … button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Customize your home page, or tap the Home page drop-down menu and then select the template that you want to add a section to.
- Tap Sections, then tap Add section, and then take one of the following steps:
- Select a section from the list, and then tap Add.
- Tap the magnifying glass icon to search for a specific section, select your section, and then tap Add.
- 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.
- Tap Add block to add a new block.
- Optional: To rearrange the order of the sections on your page, tap and drag the section.
- Tap Save.
Android
- From the Shopify app, tap the ☰ button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Customize your home page, or tap the Home page drop-down menu and then select the template that you want to add a section to.
- Tap Sections, then tap Add section, and then take one of the following steps:
- Select a section from the list, and then tap Add.
- Tap the magnifying glass icon to search for a specific section, select your section, and then tap Add.
- 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.
- Tap Add block to add a new block.
- Optional: To rearrange the order of the sections on your page, tap and drag the section.
- Tap ✓.
Edit a section
Desktop
- From your Shopify admin, go to Online Store > Themes.
- Find the theme that you want to edit, and then click Customize.
- Edit a section on your home page, or click the Home page drop-down menu and then select the template that contains the section that you want to edit.
- In the sidebar, click a section name to load the content into the preview window and access the settings and options that are available for you to edit.
- Optional: Click individual blocks to edit the blocks within a section.
- Click Save.
iPhone
- From the Shopify app, tap the … button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Edit a section on your home page, or tap the Home page drop-down menu and then select the template that contains the section that you want to edit.
- Tap Sections, and then tap a section name to load the content into the preview window and access the settings and options that are available for you to edit.
- Optional: Tap individual blocks to edit the blocks within a section.
- Tap Save.
Android
- From the Shopify app, tap the ☰ button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Edit a section on your home page, or tap the Home page drop-down menu and then select the template that contains the section that you want to edit.
- Tap Sections, and then tap a section name to load the content into the preview window and access the settings and options that are available for you to edit.
- Optional: Tap individual blocks to edit the blocks within a section.
- Tap ✓.
Duplicate a section or block
Desktop
- From your Shopify admin, go to Online Store > Themes.
- Find the theme that you want to edit, and then click Customize.
- Duplicate a section or block on your home page, or click the Home page drop-down menu and then select the template that contains the section or block that you want to duplicate.
- Click the section or block that you want to duplicate.
- In the sidebar, click … > Duplicate.
- Click Save.
iPhone
- From the Shopify app, tap the … button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Duplicate a section or block on your home page, or tap the Home page drop-down menu and then select the template that contains the section or block that you want to duplicate.
- Tap Sections, and then tap the section or block that you want to duplicate.
- Tap … > Duplicate.
- Tap Save.
Android
- From the Shopify app, tap the ☰ button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Duplicate a section or block on your home page, or tap the Home page drop-down menu and then select the template that contains the section or block that you want to duplicate.
- Tap Sections, and then tap the section or block that you want to duplicate.
- Tap … > Duplicate.
- Tap ✓.
Hide or delete a section or block
Desktop
- From your Shopify admin, go to Online Store > Themes.
- Find the theme that you want to edit, and then click Customize.
- Hide or delete a section or block on your home page, or click the Home page drop-down menu and then select the template that contains the section or block that you want to hide or delete.
- Optional: To hide a section or block from your online store, hover on a section or block name, and then click the eye icon.
- Optional: To delete a section or block from your online store, hover on a section or block name, and then click the trash can icon.
- Click Save.
iPhone
- From the Shopify app, tap the … button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Hide or delete a section or block on your home page, or tap the Home page drop-down menu and then select the template that contains the section or block that you want to hide or delete.
- Tap Sections, and then tap the section or block that you want to hide or delete.
- Optional: To hide a section or block from your online store, tap … > Hide.
- Optional: To delete a section or block from your online store, tap … > Remove.
- Tap Save.
Android
- From the Shopify app, tap the ☰ button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Hide or delete a section or block on your home page, or tap the Home page drop-down menu and then select the template that contains the section or block that you want to hide or delete.
- Tap Sections, and then tap the section or block that you want to hide or delete.
- Optional: To hide a section or block from your online store, tap … > Hide.
- Optional: To delete a section or block from your online store, tap … > Remove.
- Tap ✓.
Working with blocks
Blocks are customizable modules that you use to add content to the sections in your templates. You can use blocks to add text, images, links, buttons, and more.
Shopify themes have sections and blocks that you can customize. Some sections have fixed block types, which means that you can choose only from the blocks that are made available to that section by the theme designer.
Other sections allow you to select any block, but there's a limit on the total number of blocks that you can add to the section. If your section reaches the maximum number of blocks available, then the Add block option is greyed out and you can't click or tap it.
Add a block
Desktop
- From your Shopify admin, go to Online Store > Themes.
- Find the theme that you want to edit, and then click Customize.
- You can add a block to a section on your home page, or click the Home page drop-down menu and then select the template that you want to add a block to.
- Find the section that you want to add a block to, click Add block, and then take one of the following steps:
- Select a block from the list.
- Use the Search blocks field to find a specific block, and then select it.
- Click Save.
iPhone
- From the Shopify app, tap the … button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- You can add a block to a section on your home page, or tap the Home page drop-down menu and then select the template that you want to add a block to.
- Tap Sections, then tap Add block for the section that you want to add a block to, and then take one of the following steps:
- Select a block from the list.
- Tap the magnifying glass icon to search for a specific block, and then select your block.
- Tap Save.
Android
- From the Shopify app, tap the ☰ button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- You can add a block to a section on your home page, or tap the Home page drop-down menu and then select the template that you want to add a block to.
- Tap Sections, then tap Add block for the section that you want to add a block to, and then take one of the following steps:
- Select a block from the list.
- Tap the magnifying glass icon to search for a specific block, and then select your block.
- Tap ✓.
Use metafields and metaobjects with dynamic sources
Metafields and metaobjects allow you to display dynamic information on your online store. If you have a theme that supports metafields, then you can connect a metafield to a section or block in the theme editor.
For example, a candle seller might want to display burn times for each type of candle available. After setting up a product metafield for burn time, the seller can add a block for burn time to their product template and then connect it to the product metafield. After setting up a collection metafield for a page that lists burn times, the seller can add a block to their collection template and then connect it to the collection metafield.
You can display dynamic information in your online store by adding sections or blocks that can use dynamic sources. Dynamic sources can be used in any template, section, or block that displays compatible resources (product, collection, page, blog and blog post). You need to add your metafield before you can connect it in your templates. Refer to Dynamic sources for more information about using metafields and metaobjects with dynamic sources in your theme.
After you complete the setup process, follow the steps below to connect dynamic sources to sections or blocks in your theme, using the Connect dynamic source button.
Steps:
Desktop
- From your Shopify admin, go to Online Store > Themes.
- Find the theme that you want to edit, and then click Customize.
- Edit a section or block on your home page, or click the Home page drop-down menu and then select the template that contains the section or block that you want to edit.
- In the sidebar, click a section or block name to load the content into the preview window and access the settings and options that are available for you to edit.
- Click the Connect dynamic source button for the relevant content type that you want to edit, and then connect your dynamic source.
- Click Save.
iPhone
- From the Shopify app, tap the … button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Edit a section or block on your home page, or tap the Home page drop-down menu and then select the template that contains the section or block that you want to edit.
- Tap Sections, and then tap a section or block name to load the content into the preview window and access the settings and options that are available for you to edit.
- Tap the Connect dynamic source button for the relevant content type that you want to edit, and then connect your dynamic source.
- Tap Save.
Android
- From the Shopify app, tap the ☰ button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Edit a section or block on your home page, or tap the Home page drop-down menu and then select the template that contains the section or block that you want to edit.
- Tap Sections, and then tap a section or block name to load the content into the preview window and access the settings and options that are available for you to edit.
- Tap the Connect dynamic source button for the relevant content type that you want to edit, and then connect your dynamic source.
- Tap ✓.
Dynamic source selector
You can use the dynamic source selector to connect the correct dynamic source directly in the theme editor. Review the following key features of the dynamic source selector:
- You can reference dynamic sources from various resources, where applicable. For instance, if you connect a setting to a block that is connected to both a product resource and a page resource, then you can use the drop-down menu in the dynamic source selector to specify whether you want to search for metafields associated with either the product or the page resource.
- The dynamic source selector has a search and filter functionality to help you find the metafield that you need.
- The dynamic source selector lets you choose category metafields. These are additional attributes that become available when you assign a product category to a product. Accessing these metafields allows you to connect dynamic sources to any relevant fields on the underlying attribute metaobject.