XooCode(){

DiscussionForumPosting

DiscussionForumPosting is an Article subtype (via SocialMediaPosting) for forum posts, community threads, and discussion board entries. It adds no properties of its own. Use inherited properties like headline (thread title), author, datePublished, text (post body), and comment (replies). Google reads this for the discussion forum rich result: a card showing the thread title, reply count, and excerpts.

For a complete property walkthrough, see the Article example. The key difference is using "@type": "DiscussionForumPosting" and structuring replies as comment entries with their own authors and timestamps. Google launched a dedicated discussion forum rich result in 2023.

Full example of schema.org/DiscussionForumPosting json-ld markup

The markup is verified as valid with Rich Results Test from Google.

Highlight legend:Required by GoogleRecommendedOptional
schema.org/DiscussionForumPosting
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "DiscussionForumPosting",
  "headline": "Best approach for Product schema with variants?",
  "url": "https://community.xoocode.com/threads/product-schema-variants",
  "author": { "@type": "Person", "name": "dev_sarah", "url": "https://community.xoocode.com/users/dev_sarah" },
  "datePublished": "2026-10-05T14:22:00-04:00",
  "text": "I have a t-shirt in 5 sizes and 3 colors. Should I use ProductGroup with hasVariant, or separate Product entities? What does Google actually read?",
  "interactionStatistic": {
    "@type": "InteractionCounter",
    "interactionType": "https://schema.org/CommentAction",
    "userInteractionCount": 8
  },
  "comment": [
    {
      "@type": "Comment",
      "author": { "@type": "Person", "name": "tomas_xoo" },
      "datePublished": "2026-10-05T15:01:00-04:00",
      "text": "Use ProductGroup with hasVariant. Google consolidates reviews and ratings across variants when you use the group pattern."
    }
  ]
}
</script>

Minimal valid version

The smallest markup that still produces a valid DiscussionForumPosting entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.

schema.org/DiscussionForumPosting (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "DiscussionForumPosting",
  "headline": "Best approach for Product schema with variants?",
  "author": { "@type": "Person", "name": "dev_sarah" },
  "datePublished": "2026-10-05T14:22:00-04:00",
  "text": "Should I use ProductGroup or separate Product entities?",
  "url": "https://community.xoocode.com/threads/product-schema-variants"
}
</script>

Google rich results this unlocks

Markup matching this example makes your page eligible for the following Google Search rich results. The primary target drives the required / recommended property classification in the advanced code block above.

Common DiscussionForumPosting mistakes

Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.

  1. 01

    Using Article for a forum post

    Wrong
    "@type": "Article" for a discussion forum thread
    Right
    "@type": "DiscussionForumPosting"

    DiscussionForumPosting triggers Google's discussion forum rich result, which shows reply counts and excerpts. Generic Article does not. The subtype matters for forums and community sites.

About the example data

A thread on the Xoo Code community forum about implementing Product schema, similar to the QAPage example but in a forum format rather than Q&A.

Comments

Loading comments...

Leave a comment