Evergreen FAQ Section
Searchable, expandable FAQs with topic buttons, for any website. One small script, no dependencies.
Keep your questions in a Google Sheet (or paste them into the page). Add a row and the FAQ updates. Visitors type a few words and see only the answers that match.
What's in the download
| File or folder | What it's for |
|---|---|
INSTALL.md | Step-by-step setup for Squarespace (every plan), WordPress, Wix, Webflow, Shopify, Ghost, Carrd and plain HTML |
templates/faq-template.csv | Spreadsheet template. Open it in Google Sheets or Excel. |
embed/ | Ready-to-paste snippets. Start here. |
evergreen-faq.zip | The WordPress plugin. Upload it under Plugins → Add New → Upload Plugin. |
dist/faq-section.min.js | The compact script. Use it if you upload the file to your site. |
dist/faq-section.js | The readable script, for anyone who wants to look inside |
demo/index.html | Double-click to try it offline |
LICENSE.txt | What your license allows |
The whole idea in two lines
<div data-faq-section data-src="YOUR-PUBLISHED-GOOGLE-SHEET-CSV-LINK"></div>
<script src="faq-section.min.js" defer></script>
Every option is another data- attribute on that div. See Options in INSTALL.md.
For developers
EvergreenFaq.init(); // start any new FAQ sections on the page
faqDiv.__efq.toggle("how-do-i-cancel", true); // open a question by its id
Questions or installation help: use the contact page at evergreencode.store.
Installation
Every install has the same two parts:
- Your questions: a Google Sheet (recommended), rows pasted into the snippet, or plain HTML.
- The snippet: one of the files in
embed/, pasted where the FAQ should appear.
Step 1: Write your questions
Open templates/faq-template.csv in Google Sheets (File → Import → Upload) or Excel. One row per question:
| Column | What goes in it |
|---|---|
| Question (required) | The question, as a visitor would ask it |
| Answer (required) | The answer. See formatting below. |
| Category | Optional topic, like Billing or Visiting. Several? Separate them with commas. Topics become filter buttons. |
| Open | Optional. yes to show that answer open when the page loads. |
Column names aren't picky: "Q", "A", "Topic" and "Section" also work.
Formatting answers. Inside an answer cell:
**double asterisks**for bold,*single*for *italic*[link text](https://example.com/page)for a link; plainhttps://…addresses become links too- Start lines with
-for a bulleted list, or1.for a numbered list - A blank line starts a new paragraph. In Google Sheets, press Ctrl+Enter (Mac: ⌘+Enter) to add a line inside a cell.
Use a Google Sheet (recommended)
- Click File → Share → Publish to web.
- Under Link, choose your sheet tab, change "Web page" to Comma-separated values (.csv), and click Publish.
- Copy the link it shows. It contains
/pub?and ends inoutput=csv.
Use this link, not the address in your browser bar. A link ending in /edit won't work, and the FAQ tells you so if you paste one by mistake. Changes in the sheet appear on your site within about 5 minutes.
Or paste the rows
Use embed/2-pasted-data-embed.html and replace the example rows between the two script tags with your own (the first row is the column names). If an answer contains a comma or a line break, wrap the whole answer in "double quotes". The template shows how.
Or write plain HTML
If you'd rather write HTML, put standard <details> blocks inside the FAQ. You can use any HTML in the answers:
<div data-faq-section>
<details data-category="Visiting"><summary>Where do I park?</summary><p>Behind the building, off Oak Street.</p></details>
<details><summary>Can I bring my dog?</summary><p>Service animals are welcome.</p></details>
</div>
Step 2: Choose a snippet
File in embed/ | Use it when |
|---|---|
1-google-sheet-embed.html | One paste that does everything: your sheet link plus the script. Easiest. |
2-pasted-data-embed.html | You'd rather type your questions into the snippet than use a sheet. |
3-site-wide-script.html | Your builder has a site-wide footer code box. Paste it there once. |
4-faq-only.html | The script is already loaded (by file 3 or the hosted file) and you're adding an FAQ. |
5-hosted-file-embed.html | You can upload files to your site and want the shortest code. |
Most builders only run custom code on the published page. If you see a blank box or code while editing, check the live page or preview.
Squarespace
Works on Squarespace 7.1 and 7.0, in any template, on every plan.
Core, Plus or Advanced plans (legacy Business and Commerce)
Add a Code Block where the FAQ should go and paste embed/1-google-sheet-embed.html (with your sheet link) or embed/2-pasted-data-embed.html (with your rows).
Basic plan (legacy Personal): no upgrade needed
Basic and Personal plans don't run Code Blocks or Code Injection, but Markdown Blocks accept HTML on every plan.
This is a widely used workaround, but Squarespace doesn't officially support it and could change how Markdown Blocks behave in the future.
- Upload the script file. Edit any text block, highlight a word, click the link icon, then File → Upload file, and upload
dist/faq-section.min.js. Remove the temporary link afterward. The file is now at/s/faq-section.min.js. - Load it from your footer. Click Edit, hover over the footer, click Edit Footer, add a Markdown block and paste: ``
html <script src="/s/faq-section.min.js" defer></script>`` If your site has no footer, put this line in a Markdown block on the FAQ page instead. - Add the FAQ. Add a Markdown block where the FAQ should go and paste the line from
embed/4-faq-only.htmlwith your Google Sheet link. Keep it on one line.
Use the Google Sheet method with Markdown blocks. Don't paste rows or the whole script into a Markdown block, because Markdown can change symbols in them.
WordPress
- Go to Plugins → Add New → Upload Plugin, choose
evergreen-faq.zip, click Install Now, then Activate. - Add a Shortcode block and use either a sheet link: ``
[evergreen_faq src="YOUR-PUBLISHED-CSV-LINK"]`or type questions between the tags, one per group of lines:`` [evergreen_faq] Q: What are your hours? A: Monday to Friday, 9 to 5. Category: Visiting Q: Can I get a refund? A: Yes, within 14 days.- Email us your receipt number
- We'll reply within one business day Category: Billing [/evergreen_faq] ```
Shortcode options: search, filters, single, open_first, schema, deep_links, expand_all, show_category, contact, accent, start, class (same as the options below, with _ instead of -).
[evergreen_faq src="…" single="true" contact="/contact" accent="#7b2cbf"]
The script only loads on pages that have an FAQ. If a caching or speed plugin breaks it, exclude faq-section.min.js from its "delay JavaScript" or "combine JS" settings.
Wix
Add Embed Code → Embed HTML, paste embed/1-google-sheet-embed.html or embed/2-pasted-data-embed.html, and drag the element tall enough for your questions. Wix shows embeds in a frame, so leave room for answers to open.
Webflow
Paste embed/3-site-wide-script.html into Site settings → Custom code → Footer code once, then add an Embed element with embed/4-faq-only.html. Custom code needs a paid site plan.
Shopify
Online Store 2.0 themes: add a Custom Liquid section and paste embed/1-google-sheet-embed.html or embed/2-pasted-data-embed.html.
Ghost
Add an HTML card and paste embed/1-google-sheet-embed.html or embed/2-pasted-data-embed.html.
Carrd
Add an Embed element, set its type to Code, and paste embed/1-google-sheet-embed.html. Embeds need a Carrd Pro plan.
Any website (HTML)
Upload dist/faq-section.min.js and use embed/5-hosted-file-embed.html.
Options
Add any of these to the <div data-faq-section …> tag:
| Attribute | What it does | Example |
|---|---|---|
data-src | Your published Google Sheet (CSV) or CSV file link | data-src="https://docs.google.com/…output=csv" |
data-search | false to hide the search box | data-search="false" |
data-filters | none to hide the topic buttons | data-filters="none" |
data-start | The topic shown first (default All) | data-start="Billing" |
data-single | true to keep only one answer open at a time | data-single="true" |
data-open-first | true to open the first question when the page loads | data-open-first="true" |
data-expand-all | false to hide the Expand all link | data-expand-all="false" |
data-show-category | true to show each question's topic under it | data-show-category="true" |
data-contact | A link shown when a search finds nothing ("Can't find your answer? Contact us") | data-contact="/contact" |
data-deep-links | false to stop the address changing when a question opens | data-deep-links="false" |
data-schema | false to skip the search-engine structured data | data-schema="false" |
data-accent | Color for links, the open marker and selected topic | data-accent="#1d5c45" |
data-text-search | Search box placeholder | data-text-search="Search our FAQ" |
data-text-all | Rename the All button | data-text-all="Everything" |
Linking to a question
Every question has its own address: the page address plus #faq- and the question in lowercase with dashes. "How do I cancel?" is #faq-how-do-i-cancel. Use these links in emails, help replies or other pages, and the FAQ opens and scrolls to that question. The address updates when a visitor opens a question, so they can copy it from the address bar.
Search engines
The FAQ adds schema.org FAQPage structured data to the page, so search engines can read the questions and answers. It skips this if the page already has FAQ structured data, or if you set data-schema="false". Google currently shows special FAQ results only for well-known government and health sites, so for most sites this helps search engines understand the page rather than changing how it looks in results.
Styling
Add to your site's custom CSS (Squarespace: Design → Custom CSS, available on every plan; WordPress: Appearance → Customize → Additional CSS):
[data-faq-section] {
--efq-accent: #1d5c45; /* links, open marker, selected topic */
--efq-on-accent: #ffffff; /* text on the selected topic */
--efq-radius: 10px; /* question corners */
--efq-gap: 10px; /* space between questions */
}
The FAQ uses your site's font and text color automatically.
Troubleshooting
"The FAQ couldn't load." On your live site this message stays general. Open the page in the Squarespace editor or WordPress preview, or your browser's console, to see the exact reason. Most often it's a Google Sheet link that isn't the Publish to web → CSV link.
A question is missing. Its Question or Answer cell is empty.
An answer runs into the next row (pasted rows only). Wrap answers containing commas or line breaks in "double quotes".
Changes in my sheet don't show up. Google refreshes published sheets every few minutes. Wait, then reload.
Still stuck? Use the contact page at evergreencode.store. Installation help is included for 6 months.
Changelog
1.0.0 (2026-11-08)
First release.
- Expandable questions and answers from a Google Sheet, a CSV file, rows pasted into the page, or plain HTML (
<details>and<summary>). - Search as you type: matching answers open and the matched words are highlighted.
- Topic buttons built from your categories (or hidden with
data-filters="none"); a question can be in several. - Answers support paragraphs, bulleted and numbered lists, bold, *italic* and links.
- Links straight to a question (
#faq-how-do-i-cancel) that open and scroll to it. - Expand all / collapse all, one-at-a-time mode, open the first question, and a "Contact us" link when a search finds nothing.
- FAQ structured data (schema.org FAQPage) added automatically, unless the page already has it.
- WordPress plugin:
[evergreen_faq]with a sheet link, or Q:/A: lines typed between the tags. - Install guides for Squarespace (every plan, including Basic/Personal via Markdown Blocks), WordPress, Wix, Webflow, Shopify, Ghost, Carrd and plain HTML.
- Keyboard and screen-reader support; respects reduced motion; shielded from site-wide styles.