{"id":22739,"date":"2025-09-25T14:08:58","date_gmt":"2025-09-25T08:38:58","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/?p=22739"},"modified":"2025-10-14T16:47:30","modified_gmt":"2025-10-14T11:17:30","slug":"add-accordion-to-shopify-product-page","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/add-accordion-to-shopify-product-page\/","title":{"rendered":"How to Add an Accordion to a Shopify Product Page?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">As a Shopify store owner, you can improve your product pages using an accordion. Here, we will learn to add an accordion to the Shopify product page using two different methods.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, let\u2019s clear the basics.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a Shopify Accordion?&nbsp;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A Shopify accordion is a collapsible content element that lets you show or hide information in a clean, compact way. You can click on a title to expand the content, and it helps keep your page organized and easy to navigate for customers.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"350\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/accordion.gif\" alt=\"Accordion on the Shopify product page.\" class=\"wp-image-22743\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">It is mostly used for FAQs, product details, and organizing long content. Along with that, you can also add elements like <a href=\"https:\/\/meetanshi.com\/blog\/how-to-add-trust-badges-to-shopify-product-page\/\">Shopify trust badges <\/a>to reassure your customers.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ways to an Accordion on Shopify<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are mainly two ways to add this feature to your Shopify store, which are as follows<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Using custom code &#8211; <\/strong>You can create with Shopify Liquid, HTML, CSS, and JavaScript. This method gives you full control over the design and functionality, but it requires technical skills and more time to set up.<br><\/li>\n\n\n\n<li><strong>Through the Shopify app &#8211; <\/strong>The app makes it easy to add accordions without coding. They offer ready-made templates, customization options, and user-friendly settings so you can quickly organize product details.\u00a0<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Add FAQ Accordion to Shopify Product Page (Using an App)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Using MIT Sections Pro<strong> <\/strong>is a quick way to add an accordion section. It offers flexibility, ease of use, such as adding as much content as you want, changes in color, font size, and so on, all within a few clicks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is how it looks on your website, highly premium compared to the section made using code.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"323\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-6-700x323.png\" alt=\"Preview of the Shopify FAQ accordion using the app.\" class=\"wp-image-22773\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-6-700x323.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-6-250x115.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-6-768x355.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-6-403x186.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-6-120x55.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-6.png 825w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Step 1: Find &amp; Add Section<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First, you need to install the <a href=\"https:\/\/apps.shopify.com\/mit-custom-sections\" target=\"_blank\" rel=\"noopener\">MIT Sections Pro<strong> <\/strong><\/a>from the Shopify App Store, then from the app dashboard, click <strong>Browse sections <\/strong>and search for the <strong>Accordion <\/strong>section.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"534\" height=\"408\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/browse-section-12.png\" alt=\"On the app dashboard, click browse section and search accordion.\" class=\"wp-image-22775\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/browse-section-12.png 534w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/browse-section-12-250x191.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/browse-section-12-403x308.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/browse-section-12-120x92.png 120w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Select and click on the <strong>Try for Free <\/strong>to take a preview of the section before buying it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"322\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/try-for-free-11-700x322.png\" alt=\"Click try for free to add accordion section to Shopify product page\" class=\"wp-image-22777\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/try-for-free-11-700x322.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/try-for-free-11-250x115.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/try-for-free-11-768x354.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/try-for-free-11-403x186.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/try-for-free-11-120x55.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/try-for-free-11.png 949w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">While on the free trial, you will be redirected to the MIT demo store. After you purchase the section, you can add it to your store\u2019s theme.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here, click <strong>Add section <\/strong>and select <strong>Meetanshi-Accordion<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"218\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-add-section-5.png\" alt=\"From the left side bar, click add section and select Meetanshi-accordion\" class=\"wp-image-22779\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-add-section-5.png 558w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-add-section-5-250x98.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-add-section-5-403x157.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-add-section-5-120x47.png 120w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Step 2: Customize the Section&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After adding the section, you can customize it however you want from the editing options you are offered.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"364\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-edit-section-4-700x364.png\" alt=\"From the right side bar edit the accordion section as you wish\" class=\"wp-image-22781\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-edit-section-4-700x364.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-edit-section-4-250x130.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-edit-section-4-768x399.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-edit-section-4-403x209.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-edit-section-4-964x501.png 964w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-edit-section-4-120x62.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-edit-section-4.png 1392w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Step 3: Show it on Your Product Page<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once done making changes, save them all. And this is the preview of the stunning Accordion section.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"323\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-7-700x323.png\" alt=\"Preview of accordion on the Shopify product page using an app.\" class=\"wp-image-22785\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-7-700x323.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-7-250x115.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-7-768x355.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-7-403x186.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-7-120x55.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/app-preview-7.png 825w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">How to Add a Shopify FAQ Accordion? (Custom Code)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Below are the steps and code to create an FAQ accordion section.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Head to Theme Editor<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">From your Shopify admin panel, go to <strong>Online stores &gt; Themes &gt; \u2026(three dots) &gt; Edit code.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Create Section &amp; Add Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, from the theme editor, in the <strong>Sections <\/strong>folder, add a new section and save it as <strong>product-accordian.liquid.&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then paste the following code in the newly created section and save it.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{%- style -%}\n  .product-accordion {\n    padding: 40px 20px;\n    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n  }\n  .product-accordion .accordion-item {\n    border-bottom: 1px solid #ddd;\n  }\n  .product-accordion .accordion-title {\n    cursor: pointer;\n    font-weight: bold;\n    padding: 15px;\n    background-color: #f7f7f7;\n    color: #000;\n  }\n  .product-accordion .accordion-content {\n    padding: 0 15px 15px;\n    display: none;\n    color: #f7f7f7;\n  }\n  .product-accordion .accordion-item.active .accordion-content {\n    display: block;\n  }\n  .product-accordion .accordion-content p {\n    margin: 0;\n  }\n{%- endstyle -%}\n\n&lt;div class=\"product-accordion\">\n  {%- for block in section.blocks -%}\n    &lt;div class=\"accordion-item\" data-accordion>\n      &lt;div class=\"accordion-title\">\n        {{ block.settings.title }}\n      &lt;\/div>\n      &lt;div class=\"accordion-content\">\n        {{ block.settings.content }}\n      &lt;\/div>\n    &lt;\/div>\n  {%- endfor -%}\n&lt;\/div>\n\n{% schema %}\n{\n  \"name\": \"Product Accordion\",\n  \"tag\": \"section\",\n  \"class\": \"product-accordion\",\n  \"settings\": [],\n  \"blocks\": [\n    {\n      \"type\": \"accordion_item\",\n      \"name\": \"Accordion Item\",\n      \"settings\": [\n        {\n          \"type\": \"text\",\n          \"id\": \"title\",\n          \"label\": \"Accordion Title\",\n          \"default\": \"Accordion Title\"\n        },\n        {\n          \"type\": \"richtext\",\n          \"id\": \"content\",\n          \"label\": \"Accordion Content\",\n          \"default\": \"&lt;p>This is the accordion content.&lt;\/p>\"\n        }\n      ]\n    }\n  ],\n  \"presets\": [\n    {\n      \"name\": \"Product Accordion\",\n      \"category\": \"Product\",\n      \"blocks\": [\n        {\n          \"type\": \"accordion_item\"\n        },\n        {\n          \"type\": \"accordion_item\"\n        }\n      ]\n    }\n  ]\n}\n{% endschema %}\n\n&lt;script>\n  document.addEventListener('DOMContentLoaded', function () {\n    document.querySelectorAll('[data-accordion] .accordion-title').forEach(function (title) {\n      title.addEventListener('click', function () {\n        const item = this.parentElement;\n        item.classList.toggle('active');\n      });\n    });\n  });\n&lt;\/script>\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Edit &amp; Preview the Section<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To showcase this section in the frontend, head to <strong>Online store &gt; Themes &gt; Customize.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From the top drop-down, select <strong>Product &gt; Default products.<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"535\" height=\"304\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/click-default-product.png\" alt=\"In the theme editor, from the top dropdown click products and select default product\" class=\"wp-image-22763\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/click-default-product.png 535w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/click-default-product-250x142.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/click-default-product-403x229.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/click-default-product-120x68.png 120w\" sizes=\"auto, (max-width: 535px) 100vw, 535px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Then click <strong>Add section <\/strong>and select <strong>Product accordion.<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"562\" height=\"91\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-add-section-7.png\" alt=\"click add section from the left sidebar and select product accordion.\" class=\"wp-image-22765\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-add-section-7.png 562w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-add-section-7-250x40.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-add-section-7-403x65.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-add-section-7-120x19.png 120w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">From here, edit the section and save the changes.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"256\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-edit-section-4-700x256.png\" alt=\"Now accordion is added to the Shopify product page, edit it as needed.\" class=\"wp-image-22767\" style=\"width:700px;height:auto\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-edit-section-4-700x256.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-edit-section-4-250x91.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-edit-section-4-768x281.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-edit-section-4-403x147.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-edit-section-4-964x352.png 964w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-edit-section-4-120x44.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-edit-section-4.png 1325w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">This is how it will be previewed. Simple and very basic.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/code-preview-5-700x178.png\" alt=\"Preview of the accordion on the Shopify product page using code.\" class=\"wp-image-22771\"\/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Best Way to Add an Accordion to Shopify<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The best way is to grab a dedicated Shopify app like MIT Sections Pro. It&#8217;s super customizable, won&#8217;t cost much, and comes packed with tons of ready-to-use sections that look great and are easy for everyone to use.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Other ways can be a real time-sink and might not even give you what you&#8217;re looking for.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With MIT Sections Pro, you get full access to all sections, plus a free trial so you can try them out before you buy. Choosing our app will totally upgrade your store, which is a win-win for your business.<\/p>\n\n\n<div class=\"meetanshi-cta\">\r\n<div class=\"cta-content-wrapper\">\r\n<span>130+ Shopify Sections<\/span>\r\n<p>Your all-in-one solution to create a professional Shopify store<\/p>\r\n<a href=\"https:\/\/apps.shopify.com\/mit-custom-sections\" target=\"_blank\" class=\"btn-primary\" rel=\"noopener\">Install App Now<\/a>\r\n<\/div>\r\n<div class=\"cta-image-new\">\r\n<img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/11\/mit-sections-pro.png\" alt=\"MIT Sections Pro\">\r\n<\/div>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>As a Shopify store owner, you can improve your product pages using an accordion. Here, we will learn to add an accordion to the Shopify&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[787],"tags":[],"class_list":["post-22739","post","type-post","status-publish","format-standard","hentry","category-shopify"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/22739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=22739"}],"version-history":[{"count":4,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/22739\/revisions"}],"predecessor-version":[{"id":23680,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/22739\/revisions\/23680"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=22739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=22739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=22739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}