Skip to content

FAQ Accordion Section for Shopify

Shopify FAQ section with a native details accordion, an intro column with contact button, and optional FAQPage structured data.

Also known as: faq section, faq accordion, frequently asked questions section, help page questions

Preview with sample data

Open in new tab

Liquid code

A FAQ accordion section for Shopify with an intro column, a contact button and optional FAQPage structured data. Use it on a help page, a product page or the home page to answer questions about delivery, returns and product care before customers need to ask. Copy section.liquid into your theme's sections folder and add it from the theme editor as "WDS FAQ".

How it works

Each question is a block built on the native HTML details and summary elements, so the accordion opens and closes without any JavaScript. A plus icon turns into a minus while a question is open. All questions in a section share a group name, so opening one closes the other in browsers that support grouped details. In older browsers, several can stay open at once.

On screens 990 px and wider, the heading, intro and button sit in a left column that stays in view while the questions scroll beside it. On smaller screens, the intro stacks above the questions.

When you select a question block in the theme editor, it opens automatically so you can see the answer as you edit it.

Customization

All of these are in the theme editor:

  • Heading and Intro: the left column. The intro is rich text, so it can include links.
  • Button label and Button link: a call to action such as a contact page. The button appears only when both are filled in.
  • Open the first question: shows one answer on load.
  • Add FAQ structured data: outputs FAQPage JSON-LD built from your questions and answers.
  • Question and Answer on each block: the answer is rich text.
  • Background, Text and Accent colors: the accent colors the button, the icons and the focus outlines.
  • Side padding, Top padding and Bottom padding.

Use cases

  • Help pages: answer delivery, returns and product care questions before customers need to ask
  • Product pages: add an FAQ beside an intro column with a contact button
  • Home pages: show common questions in a native accordion that works without extra scripts
  • Stores wanting search visibility: add optional FAQPage structured data for the questions

Accessibility

Native details and summary elements give keyboard and screen reader support by default: Tab moves between questions, and Enter or Space toggles them. Questions and the button have a visible focus outline, the section heading is an h2, and the icon animation is turned off for people who prefer reduced motion.

Usage notes

This section requires an Online Store 2.0 theme. Its fonts come from your theme, as do the base font size and line height of the text.

The preview uses sample questions from an invented store, and no photos are involved. Its button goes nowhere, and it leaves out the structured data, which section.liquid adds on a real store. Replace the sample answers with your real policies.

Enable Add FAQ structured data on one FAQ section per page only, and only when the questions are visible to shoppers, as the setting's own note says. Search engines may still not show a rich result. Answers open instantly, without a height animation. The button text is always white, so choose a dark enough accent color. With no question blocks, the list is empty on the storefront and only the intro column remains.

FAQ Accordion Section for Shopify at a glance

Framework
Shopify
Code
Liquid
JavaScript
A small script inside the section, no jQuery
Dependencies
fonts.googleapis.com
Layout
Responsive, works on mobile
Category
FAQ Sections
License
Free for personal and commercial use

Questions about this section

Can I use the FAQ Accordion Section for Shopify code for free?

Yes. You can copy or download the Liquid code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my Shopify store?

Create a new section named shopify-faq in your theme code editor, paste the Liquid code and save. Then add the section to a page in the theme editor. It works with Online Store 2.0 themes.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

How to install

  1. In your Shopify admin, go to Online Store > Themes, open the theme's menu and choose Edit code.
  2. Under Sections, add a new section named shopify-faq, replace its contents with the Liquid code above and save.
  3. Open the theme editor, choose Add section and add it to the page.

Requires an Online Store 2.0 theme. Try it on a copy of your theme first. WebDevSnippets is not affiliated with or endorsed by Shopify.

FAQ Accordion Section for Shopify – Shopify faq sections component screenshot
FAQ Accordion Section for Shopify · Shopify FAQ Sections

More FAQ Sections

Two-Column FAQ – Bootstrap 5 faq sections preview

Two-Column FAQ

Bootstrap 5 FAQ section with questions split into two accordion columns, plus/minus icons and a dark contact support prompt.

FAQ with Category Tabs – Bootstrap 5 faq sections preview

FAQ with Category Tabs

Bootstrap 5 FAQ section where category pills switch between separate accordion sets, with question counts and a support card.

FAQ with Live Search Filter – Tailwind CSS faq sections preview

FAQ with Live Search Filter

Tailwind CSS FAQ section with a live search box that filters questions as you type, highlights matches, adds topic chips and shows an empty state.

FAQ Accordion Section – Tailwind CSS faq sections preview

FAQ Accordion Section

Dark Tailwind CSS FAQ section with an accessible accordion, smooth expand animation, keyboard navigation and a support contact card.