首页 > 解决方案 > 错误:事物不是 itemReviewed 属性的已知有效目标类型

问题描述

它显示错误:对于 itemReviewed 属性来说,Thing is not a known valid target type.for 下面的代码。请帮忙。

<div itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating" style="color: #333; margin: 10px auto; font-size: 12px;display: inline-block;width: 100%;line-height: 20px;">
<span itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing" style="color: #333; margin: 20px auto; font-size: 12px;">
    <span itemprop="name">#</span>&nbsp;
</span>
<span>
    <a href="https://#/testimonials.html" title="Check all reviews" rel="nofollow" style="color: #333; margin: 20px auto; font-size: 12px;">Reviews</a>
</span><br>
<span itemprop="ratingValue" style="color: #333; margin: 20px auto; font-size: 12px;">5</span> rating, out of 
<span itemprop="bestRating" style="color: #333; margin: 20px auto; font-size: 12px;">5</span> based on 
<span itemprop="ratingCount" style="color: #333; margin: 20px auto; font-size: 12px;">1127</span> Patients.

标签: phphtmlcssstructured-data

解决方案


如果您想获得丰富的结果,Google 仅支持 itemReviewed 类型的子集:

https://developers.google.com/search/docs/data-types/review-snippet#review-properties

文档有点令人困惑,因为它确实提到了关于 itemReviewed 的值的事物,但随后列出了它可以是哪些特定类型。


推荐阅读