Accordion block
Product page block
Last updated
Product page block
Last updated
Theme retirement | Context is no longer available on the Shopify theme store. Theme support and updates for current users will end after May 18, 2024. Learn more here.
In the Product template, the Accordion block lets you add multiple headings that reveal more text when clicked. It's great for answering common questions or adding further product details in a compact way.
This guide shows you how to set up the Accordion block on product pages.
Follow the steps to add an accordion with a heading and body text. You can choose to display accordions as closed or open when the page is first loaded.
If you want to show different text for specific products, you can use Shopify's metafields and dynamic sources. These features allow you to store custom information for each of your products and automatically display that information on the correct product pages.
Follow the steps below to create metafields for your products, add text to your products' metafields, then use Dynamic sources to connect those metafields to text fields in your theme editor.
For a general introduction, see our Dynamic sources and metafields tutorial.
Shopify's Metafields lets you store additional information about your products. You can create custom fields to hold different types of information in your Shopify admin, and enter unique content for each of your products.
The steps below tell you how to add a metafield for storing text that you want to display in the accordion block.
Once you've created Metafields for your products in the Shopify admin, you can now add content to those fields for your products in the Shopify admin.
Now that the Metafields of your products have content, you can go to the theme editor to insert a Dynamic source to the Accordion block.
Related links