XenForo Fix Google discussion forum structured data schema error

wikislo

Registered
This is how I solved the markup errors with the latest Google update as mentioned here: Implemented - Markup improvements for Google
edit template: post_macros
find paragraph

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>

1718802266673.png
 
  • Tags
    error fix google
  • Back
    Top Bottom