Xenforo Tutorial How to Fix Google discussion forum structured data schema error

Codes MagicCodes Magic is verified member.

Administrator
Administrator
Moderator
Points 5,569
Solutions 0
Codes MagicCodes Magic is verified member.
‎6 Months of Service‎
Here's how I resolved the markup errors after the latest Google update, as mentioned in "Implemented - Markup improvements for Google":
  1. Edited the post_macros template.
  2. Located the relevant paragraph section.
  3. Made the necessary adjustments.
HTML:
<xf:if is="$includeMicrodata">
 <meta itemprop="parentItem" itemscope itemid="{{ link('canonical:threads', $thread) }}" />
</xf:if>

REPLACE WITH
HTML:
<xf:if is="$includeMicrodata">
        <meta itemprop="parentItem" itemscope itemid="{{ link('canonical:threads', $thread) }}" />
        <div itemprop="author" itemscope itemtype="https://schema.org/Person">
            <meta itemprop="name" content="{{ $post.User.username ?: $post.username }}" />
            <meta itemprop="url" content="{{ link('canonical:members', $post.User) }}" />
        </div>
        <meta itemprop="text" content="{{ $post.message }}" />
        <meta itemprop="url" content="{{ link('canonical:posts', $post) }}" />
        <meta itemprop="name" content="Post by {{ $post.User.username ?: $post.username }}" />
    </xf:if>
Schema Markup Validator
validator.schema.org
1718802266673.webp
 
Back