Sections and blocks
Themes usesectionsto create your ideal layout. Most sections are made up ofblocksthat serve a specific function, such as headers, text, single images, a collage of images, or links. Using sections and blocks in your templates provides more flexibility in how you arrange your store's content, enabling you to control the look 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. Which sections and blocks are available depends on your theme. For more information about what 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, theImage with textsection can only display the blocks specified by the theme designer for your theme. InDawn, the free Shopify theme, you can add only one of each of the following blocks:
- a heading
- a paragraph
- a button
You can further customize the section by editing itsSettingsto include an image and choose the alignment, size, background color, and what loads first when customers visit your online store.
If the sections that you add to your store layout don't include the settings or options that you need, then you canedit your theme codeorcontact your theme's developer for support.
Customize 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 dropdown menu to select a different template, or use the search bar in the template dropdown to search for a specific page type. Selecting a template loads it into the theme editor, and any changes you make are previewed in the editor as you make them.
Add a section
Add a new section to any page in your online store.
Steps:
- From your Shopify admin, go to欧宝体育官网入口首页>Themes.
- Find the theme that you want to edit, and then clickCustomize.
- From theShopify app, tap商店.
- In theSales channelssection, tap欧宝体育官网入口首页.
- TapManage themes.
- Find the theme that you want to edit, and then tapCustomize.
- Tap编辑.
- From theShopify app, tap商店.
- In theSales channelssection, tap欧宝体育官网入口首页.
- TapManage themes.
- Find the theme that you want to edit, and then tapCustomize.
- Tap编辑.
- Select a template from the drop-down menu.
- Click+ Add section, and either select a new section from the list or use theSearchbar to search for a specific term.
- Click on the new section to edit the blocks within the section.
- Optional: Click and drag the
⋮⋮
icon next to a section to rearrange the sections on your page. - ClickSave.
编辑a section
- From your Shopify admin, go to欧宝体育官网入口首页>Themes.
- Find the theme that you want to edit, and then clickCustomize.
- From theShopify app, tap商店.
- In theSales channelssection, tap欧宝体育官网入口首页.
- TapManage themes.
- Find the theme that you want to edit, and then tapCustomize.
- Tap编辑.
- From theShopify app, tap商店.
- In theSales channelssection, tap欧宝体育官网入口首页.
- TapManage themes.
- Find the theme that you want to edit, and then tapCustomize.
- Tap编辑.
- From the dropdown menu, select the template that contains the section that you want to edit.
- Click a section to load the content into the preview window and access the options available to you.
- Optional: Click individual blocks to edit the blocks within the section.
- ClickSave.
Remove a section or block
- From your Shopify admin, go to欧宝体育官网入口首页>Themes.
- Find the theme that you want to edit, and then clickCustomize.
- From theShopify app, tap商店.
- In theSales channelssection, tap欧宝体育官网入口首页.
- TapManage themes.
- Find the theme that you want to edit, and then tapCustomize.
- Tap编辑.
- From theShopify app, tap商店.
- In theSales channelssection, tap欧宝体育官网入口首页.
- TapManage themes.
- Find the theme that you want to edit, and then tapCustomize.
- Tap编辑.
- From the dropdown menu, select the template that contains the section that you want to edit.
- Click a section to load the content into the preview window and access the options available to you.
- Click the eye icon to hide or unhide a section or block.
- ClickRemoveto delete a block or section.
Some sections have fixed block types and limits. If a limit exists for a particular section or block, then the interface tells you you've used X out of X blocks available. If you've used the maximum number of blocks, then you won't be able to add any additional blocks until you've deleted an existing one.
Working with blocks
Blocks are customizable modules that make up the sections in your page 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 only choose from the blocks made available to that section by the theme designer. Other sections allow you to select any block, but limit the total number of blocks that you can add to the section. If your section reaches the maximum number of blocks available, then a message displays the limit reached, and the+ Add blockoption is greyed out until an existing block is removed.
Add a block
- From your Shopify admin, go to欧宝体育官网入口首页>Themes.
- Find the theme that you want to edit, and then clickCustomize.
- From theShopify app, tap商店.
- In theSales channelssection, tap欧宝体育官网入口首页.
- TapManage themes.
- Find the theme that you want to edit, and then tapCustomize.
- Tap编辑.
- From theShopify app, tap商店.
- In theSales channelssection, tap欧宝体育官网入口首页.
- TapManage themes.
- Find the theme that you want to edit, and then tapCustomize.
- Tap编辑.
- From the dropdown menu, select the template that contains the section that you want to edit.
- Click a section to load the content into the preview window and access the options available to you.
- Click+ Add blockand select a new block, or click theSearchbar to enter a search term.
- ClickSave.
Using Metafields and dynamic sources
Metafieldsallow 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 section or block in a product template. In non-product templates, dynamic sources can be used in sections or blocks that show products. You need toadd your Metafieldbefore you can connect it in your templates. Refer toDynamic Sourcesfor more information about using Metafields and dynamic sources in your theme.
After you complete the setup process, follow these steps to insert the dynamic source into your template:
- From your Shopify admin, go to欧宝体育官网入口首页>Themes.
- Find the theme that you want to edit, and then clickCustomize.
- From theShopify app, tap商店.
- In theSales channelssection, tap欧宝体育官网入口首页.
- TapManage themes.
- Find the theme that you want to edit, and then tapCustomize.
- Tap编辑.
- From theShopify app, tap商店.
- In theSales channelssection, tap欧宝体育官网入口首页.
- TapManage themes.
- Find the theme that you want to edit, and then tapCustomize.
- Tap编辑.
- From the dropdown menu, select the template that contains the section that you want to edit.
- Click an existing section to load the content into the preview window and access the options available to you, or click+ Add section.
- Click+ Add block, and then connect a dynamic source:
- If the connect dynamic source icon is displayed, then click to select a single metafield:
- If the connect dynamic source icon displays a+, then click to select up to 20 metafields by adding them one at a time:
- ClickSave.