Why is my FAQ accordion functionality only partially working?

Topic summary

A user implemented an accordion FAQ section using code from a GitHub repository but encountered an issue where only the first FAQ section expanded/collapsed while subsequent sections remained non-functional.

Root Cause Identified:
The JavaScript getConfig() function only returned the section ID for the first section, preventing the script from applying to additional FAQ sections on the page.

Resolution:
The original code author clarified the component was designed for single-instance use (one section per page) due to Google’s FAQ rich snippet schema requirements. However, they updated the GitHub code to support multiple instances per page, adding features like:

  • Toggle FAQ Rich Schema
  • Additional settings for max-width and margins

The solution was successfully tested with two instances on one page, and the issue was marked as resolved.

Follow-up Issue:
A separate user reported styling problems with the FAQ component:

  • Color customization settings for questions/answers not applying (remaining black/dark grey)
  • On iPhone specifically, question text and +/- dropdown icons display in blue instead of selected colors

This secondary issue remains unresolved, with the user requesting assistance while using the Refresh theme.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

Hi @andylewie ,

It may have the same ID, that’s why the code doesn’t work.

Please send me the code you added, I will help you check it