Fluorescent
Spark
Spark
  • Spark Help Center
    • Start using Spark
      • Migrate your theme
      • Theme licenses
    • FAQs
    • Changelog
  • General
    • Editing themes
      • Adding sections
      • Using templates
      • Accessibility
      • Customizing your site
      • H1 headings tags
      • SEO for Shopify themes
      • Online store speed
    • Image guide
      • Web ready photography
      • Image sizes
      • File formats
      • Theme image settings
    • Adapting theme content
      • Edit default theme content
      • Multiple languages
      • Dynamic content with metafields
      • Unique content for markets
    • Update your theme
      • Upgrade to OS2
  • Theme styles
    • Theme settings
    • Style presets
    • Fonts
    • Colors
    • Animation
    • Buttons
  • Pages
    • Templates
      • About page
      • Blogs page
      • Blog posts template
      • Collections list page
      • Contact page
      • FAQ page
      • Lookbook page
      • Password page
      • Search page
      • 404 page
      • Home page
    • Sections
      • Blog posts
      • Collection list
      • Countdown banner
      • Events
      • Featured collection
      • Featured collection row
      • Featured product
      • Image with features
      • Image with text
      • Inline features
      • Logo list
      • Map
      • Mosaic grid
      • Newsletter
      • Questions and answers
      • Quotes
      • Rich text
      • Shoppable feature
      • Shoppable image
      • Slideshow
      • Social proof
      • Testimonials
      • Text columns with images
      • Video
      • Video hero
    • Popups
  • Header
    • Header
      • Logo
      • Layout and style
      • Transparent header
      • Customer account link
    • Announcement bar
    • Quick search
  • Footer
    • Footer
      • Links block
      • Newsletter block
      • Text and image block
      • Payment icons
      • Language selector
      • Country selector
      • Social media icons
      • Footer text
  • Products
    • Product listings
    • Hover add-to-cart
  • Cart
    • Cart page
    • Fly-out cart
  • Product pages
    • Product template
      • Pre-order template
      • Alternate product template
    • Layout and style
      • Breadcrumbs
      • Navigation buttons
      • Media gallery
      • Quick purchase bar
      • Gift recipient form
    • Product overview blocks
      • Default blocks
        • Title
        • Price
        • Description
        • Variant selector
        • Quantity selector
        • Buy buttons
        • Local pickup banner
        • Share icons
      • Accordion block
      • Complementary products
      • Custom text field
      • Information popup
      • Payment accordion
      • Security accordion
      • Shipping accordion
      • Stock level indicator
      • Text block
      • App blocks
    • Product page sections
      • Product reviews
      • Recommended products
    • Variant options
      • Variant chips
      • Variant swatches
        • Use default colors
        • Use custom colors
        • Use custom images
        • Show on product cards
        • Dynamic option availability
      • Sibling product swatches
  • Collection pages
    • Collection template
    • Banner
    • Product grid
    • Filters and sorting
  • Support
    • Support policy
    • Shopify vs Theme issues
    • Store access requests
  • For developers
    • Custom CSS
    • Custom fonts
    • Custom Liquid
    • Custom JavaScript events
    • Edit Theme JavaScript
Powered by GitBook
On this page
  • Set up accordion block
  • Add dynamic content for different products
  • 1. Create metafield for products
  • 2. Add content to metafields
  • 3. Insert metafields as dynamic sources

Was this helpful?

  1. Product pages
  2. Product overview blocks

Accordion block

Product page block

Last updated 11 months ago

Was this helpful?

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 , , and 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.

STEPS

In your theme editor (Customize):

  1. Under Product overview, click (+) Add block and select Accordion.

  2. Click on the new Accordion block to open the settings.

  3. Select which Column to display the accordion: Either the Right (in the product form) or on the Left (beneath the product media).

  4. Set the Style of the accordion to be Open or Closed when customers first visit your product page.

  5. Enter text in Heading to display as the title.

    We recommend a heading that explains the content in a few words.

  6. Enter Text to display inside the accordion when opened.

  7. (Optional.) Click and hold the drag handles ⋮⋮ to rearrange the blocks:

    Click Remove block in the block settings to delete a block.

    Click the Eye icon to hide or unhide a block.

  8. Click Save.

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.

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.

STEPS

In your theme editor (Customize):

  1. Click on a Accordion block to open the settings.

  2. Next to the Heading or Body field, click the Insert dynamic source button and select (+) Add Metafield.

    Alternatively, go to Settings > Custom data in your Shopify admin.

  3. Click the Products tab.

  4. Click the Add definition button in the top-right.

  5. Enter a Name that describes what information the metafield will contain. For example: "Shipping", "Materials", "Details".

  6. Click (+) Select type button and select Single line text or Multi-line text.

  7. Click Save.

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.

STEPS

In your Shopify admin:

  1. Go to your Product inventory in your Shopify admin and open one of your Products.

  2. Scroll down to the Metafields section and enter the text for your Accordion heading or text in the metafields that you created.

  3. Click Save.

  4. Repeat steps 1 - 3 to enter content to the metafields for each of your products.

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.

STEPS

In your theme editor (Customize):

  1. Click on a Accordion block to open the settings.

  2. Click the Insert dynamic source button next to Heading or Text field.

  3. Select the Metafield that you created.

  4. You can now preview your store to confirm the correct content appears when viewing different products.

  5. Click Save.

\


Related links

To show different text on different product pages, you can or .

Use the formatting buttons to add text styles, links, or lists. To learn more, see Shopify's .

To show different text on different product pages, you can or .

For a general introduction, see our .

Rich text editor guide ↗
Dynamic sources and metafields tutorial
Product template
Questions and answers section
Shipping
Payments
Security
use dynamic sources
use dynamic sources
create multiple templates
create multiple templates