Accordion block
Product page block
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.
See also Spark's specialized accordions for Shipping, Payments, and Security to help build trust with your customers.
Set up accordion block
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.
Add dynamic content for different products
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.
1. Create metafield for products
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.
2. Add content to metafields
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.
3. Insert metafields as dynamic sources
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
Last updated