Feature Request: FAQ Schema (JSON-LD) Support
Description
Add the ability to inject a FAQPage JSON-LD structured data schema into pages that contain FAQ content. This should work for:
- Native Gutenberg FAQ block — with an opt-in toggle (checkbox) in the block settings sidebar to enable schema generation.
- GenerateBlocks Accordion block — compatible integration so FAQ schema is also generated when using the GenerateBlocks Accordion as a FAQ.
Expected Schema Output
When enabled, the following JSON-LD script should be injected into the page <head> or inline at the bottom of the block:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "How to find an apprenticeship?",
"acceptedAnswer": {
"@type": "Answer",
"text": "<p>We provide an official service to search through available apprenticeships. To get started, create an account here, specify the desired region, and your preferences. You will be able to search through all officially registered open apprenticeships.</p>"
}
}, {
"@type": "Question",
"name": "Whom to contact?",
"acceptedAnswer": {
"@type": "Answer",
"text": "You can contact the apprenticeship office through our official phone hotline above, or with the web-form below. We generally respond to written requests within 7-10 days."
}
}]
}
</script>
Proposed Behaviour
Native Gutenberg FAQ Block
- Add a toggle/checkbox in the block inspector panel (sidebar) labeled something like "Add FAQ Schema (JSON-LD)".
- When enabled, the plugin reads the question/answer pairs from the block content and generates the
FAQPage JSON-LD structure.
- The script tag is injected into the page
<head> using wp_head or equivalent.
GenerateBlocks Accordion
- Detect when a GenerateBlocks Accordion is being used as a FAQ (e.g. via a dedicated toggle in the block settings or a CSS class convention).
- When enabled, parse the accordion items (title = question, content = answer) and generate the same
FAQPage JSON-LD output.
Why This Matters
FAQ structured data helps search engines understand Q&A content and can enable rich results in Google Search (expandable FAQ entries in SERPs), improving SEO and click-through rates.
Reference: Google FAQ Rich Results documentation
Acceptance Criteria
Feature Request: FAQ Schema (JSON-LD) Support
Description
Add the ability to inject a
FAQPageJSON-LD structured data schema into pages that contain FAQ content. This should work for:Expected Schema Output
When enabled, the following JSON-LD script should be injected into the page
<head>or inline at the bottom of the block:Proposed Behaviour
Native Gutenberg FAQ Block
FAQPageJSON-LD structure.<head>usingwp_heador equivalent.GenerateBlocks Accordion
FAQPageJSON-LD output.Why This Matters
FAQ structured data helps search engines understand Q&A content and can enable rich results in Google Search (expandable FAQ entries in SERPs), improving SEO and click-through rates.
Reference: Google FAQ Rich Results documentation
Acceptance Criteria
FAQPageJSON-LD is injected in the page<head>.