top of page

Shopify FAQ Section With Schema (Free Custom Liquid Code)

  • Mar 15
  • 4 min read

Introduction

Many Shopify stores add FAQ sections to answer common questions about shipping, returns, or product usage.


But most themes either include a very basic FAQ block or require installing an app just to add structured data.


If you’re trying to improve SEO and qualify for FAQ rich snippets in Google, you actually don’t need an app at all.


In this guide, I’ll show you how to add a searchable FAQ section with built-in FAQ schema using a simple Custom Liquid block.


You’ll get:


• a clean accordion FAQ layout

• built-in FAQ schema for rich snippets

• a search feature for longer FAQ lists

• and no additional Shopify apps



Why FAQ Sections Matter for Shopify SEO

For many Shopify stores, FAQ sections are more than just customer support content. They can also improve:


1. Search visibility


Google supports FAQPage structured data, which can help your page appear with expanded FAQ results in search.


2. Conversion rate


Customers often hesitate because of questions about shipping, compatibility, or warranty. A well-placed FAQ section removes those objections.


3. Content depth


Search engines prefer pages that answer real user questions. Adding FAQs naturally expands your page with relevant keywords.


This is why many high-performing product pages include structured FAQ blocks.



Shopify FAQ Section Code (Custom Liquid)


Below is an example layout of the FAQ section:



The section supports expandable questions, keyword search, and automatically generates the structured data needed for Google.


You can paste the following code directly into a Custom Liquid section or block inside Shopify.

<style>
.faq-pro-wrapper{
max-width:1000px;
margin:60px auto;
padding:0 20px;
}

.faq-pro-title{
text-align:center;
font-size:32px;
margin-bottom:30px;
}

.faq-search{
width:100%;
padding:12px;
margin-bottom:30px;
border:1px solid #ddd;
border-radius:6px;
}

.faq-grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:20px;
}

@media(max-width:768px){
.faq-grid{
grid-template-columns:1fr;
}
}

.faq-item{
border-bottom:1px solid #eee;
padding:12px 0;
}

.faq-item summary{
font-weight:600;
cursor:pointer;
font-size:16px;
}

.faq-item p{
margin-top:8px;
color:#555;
line-height:1.6;
}
</style>


<div class="faq-pro-wrapper">

<h2 class="faq-pro-title">Frequently Asked Questions</h2>

<input 
class="faq-search" 
type="text" 
placeholder="Search FAQ..." 
id="faqSearch"
/>

<div class="faq-grid" id="faqList">

{% assign faq_list = 
"How long is shipping?|Orders ship within 1–2 business days and usually arrive within 5–7 days.,
Do you ship internationally?|Yes, we ship worldwide and offer international shipping rates at checkout.,
What is your return policy?|Returns are accepted within 30 days for unused items in original packaging.,
Is there a warranty?|Yes, all products include a 1-year warranty covering manufacturing defects.,
Can I track my order?|Yes, once your order ships you will receive a tracking link via email.,
Do you offer bulk discounts?|Yes, please contact us if you are ordering more than 10 units." | split: "," %}


{% for faq in faq_list %}
{% assign item = faq | split: "|" %}

<details class="faq-item">
<summary>{{ item[0] }}</summary>
<p>{{ item[1] }}</p>
</details>

{% endfor %}

</div>

</div>



<script>

const searchInput = document.getElementById("faqSearch");
const faqs = document.querySelectorAll(".faq-item");

searchInput.addEventListener("keyup", function() {

const term = this.value.toLowerCase();

faqs.forEach(faq => {

const text = faq.innerText.toLowerCase();

faq.style.display = text.includes(term) ? "block" : "none";

});

});

</script>


<script type="application/ld+json">
{
"@context":"https://schema.org",
"@type":"FAQPage",
"mainEntity":[
{% for faq in faq_list %}
{% assign item = faq | split: "|" %}
{
"@type":"Question",
"name":"{{ item[0] }}",
"acceptedAnswer":{
"@type":"Answer",
"text":{{ item[1] | json }}
}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}
</script>


How to Install This FAQ Section in Shopify

Step 1

Open your Shopify admin dashboard.


Step 2

Go to Online Store → Themes


Step 3

Click Customize


Step 4

Add a Custom Liquid block


Step 5

Paste the code from this guide.


Step 6

Edit the FAQ questions directly in the code



How to Customize This Shopify FAQ Section

The code is designed to be simple to modify. Here are a few common changes you might want to make.


What to change

Where to edit

Example

Edit a FAQ question and answer

In the faq_list section

Do you ship internationally? | Yes, we ship worldwide.

Add more FAQ items

Duplicate an existing line in faq_list

What is the warranty? | All products include a 1-year warranty.

Change the section title

Edit the <h2> line

<h2 class="faq-pro-title">Shipping & Product Questions</h2>

Switch to a single column layout

Modify the CSS grid setting

Change grid-template-columns:1fr 1fr; to grid-template-columns:1fr;

Customize the search placeholder

Edit the input placeholder text

placeholder="Search shipping or warranty..."

This keeps the FAQ content and the structured data aligned, since the schema is automatically generated from the same FAQ list.



How the FAQ Schema Works

Inside the code, each FAQ entry is defined using a simple format:


Question | Answer

The script automatically converts this list into FAQPage structured data using JSON-LD.


This ensures:

• the visible FAQ content matches the schema

• Google can crawl the questions easily

• and the page qualifies for FAQ rich results.



Best Pages to Add FAQ Sections

Recommended locations include:


Product pages


Answer questions about compatibility, shipping, warranty, or materials.


Landing pages


Explain how the product works or who it’s designed for.


Pricing pages


Clarify billing questions or subscription details.


Tool pages


If you run tools (like calculators), FAQ sections help capture long-tail search traffic.

Comments


bottom of page