Structured Data (Schema)

  • JNext lesson
  • KPrevious lesson
  • FSearch lessons
  • EscClear search

Overview

Several blocks output JSON-LD structured data in <script type="application/ld+json"> tags. This helps search engines understand your content and can enable rich results in search listings.

Accordion Block – FAQPage Schema

When the “Enable FAQ Schema” toggle is turned on, the accordion block outputs FAQPage schema. Each accordion item becomes a Question with an acceptedAnswer.

{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is this plugin?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A collection of ACF blocks..."
      }
    }
  ]
}

The schema is only output on the frontend (not in editor previews).

Product Review – Product Schema

The product review block outputs a comprehensive Product schema that includes:

  • Review with author, reviewBody, and reviewRating
  • Offer with price, priceCurrency, and availability
  • positiveNotes (pros) and negativeNotes (cons) as ItemList objects
  • aggregateRating if ratings are provided

This schema can produce rich review snippets in Google Search results.

Star Rating – AggregateRating Schema

The star rating block outputs AggregateRating schema based on submitted user ratings. The @type of the parent object is configurable from the block settings:

  • Article
  • BlogPosting
  • CreativeWork
  • Product
  • (and others)

The schema includes ratingValue (the average) and ratingCount (total number of submissions).

Table of Contents – ItemList Schema

The TOC block outputs ItemList with SiteNavigationElement typed items. Each heading linked in the table of contents becomes a ListItem with a url pointing to the heading’s anchor.

Best Practices

  • Only enable FAQ schema on pages that genuinely answer questions. Google may ignore FAQ schema if overused.
  • Product review schema should reflect real editorial reviews, not user-generated content.
  • The star rating schema is appropriate for content rating (blog posts, articles). For product ratings, pair it with the product review block instead.
  • Validate your structured data using Google’s Rich Results Test after adding blocks with schema support.