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:

  1. Select a template from the drop-down menu.
  2. Click+ Add section, and either select a new section from the list or use theSearchbar to search for a specific term.
  3. Click on the new section to edit the blocks within the section.
  4. Optional: Click and drag the⋮⋮icon next to a section to rearrange the sections on your page.
  5. ClickSave.

编辑a section

  1. From the dropdown menu, select the template that contains the section that you want to edit.
  2. Click a section to load the content into the preview window and access the options available to you.
  3. Optional: Click individual blocks to edit the blocks within the section.
  4. ClickSave.

Remove a section or block

  1. From the dropdown menu, select the template that contains the section that you want to edit.
  2. Click a section to load the content into the preview window and access the options available to you.
  3. Click the eye icon to hide or unhide a section or block.
  4. 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

  1. From the dropdown menu, select the template that contains the section that you want to edit.
  2. Click a section to load the content into the preview window and access the options available to you.
  3. Click+ Add blockand select a new block, or click theSearchbar to enter a search term.
  4. 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:

  1. From the dropdown menu, select the template that contains the section that you want to edit.
  2. Click an existing section to load the content into the preview window and access the options available to you, or click+ Add section.
  3. Click+ Add block, and then connect a dynamic source:
  • If the connect dynamic source icon is displayed, then click to select a single metafield:
    Connect dynamic source
  • If the connect dynamic source icon displays a+, then click to select up to 20 metafields by adding them one at a time:
    Insert dynamic source icon
  1. ClickSave.

Ready to start selling with Shopify?

Try it free