我在Google Rich Snippets工具中查看了我网站的Rich Snippets,但它出现了错误:
审核没有指定审核项目。
我该如何解决?
代码是:
<div itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">5</span> stars - based on <span itemprop="reviewCount">21</span> reviews
</div>
答案 0 :(得分:14)
错误消息非常容易解释您遇到的一个问题,但这不是您提供的代码的唯一问题。另一个问题是你已经使用了itemprop而没有一个项目,这是。
的属性AggregateRating需要评级的项目。如果没有指定适用的内容,则不能拥有AggregateRating。有两种方法可以做到这一点(不要两者兼得):
使用包含项目并将AggregateRating指定为属性。你(有点)建议这是你正在尝试使用没有包含项目的itemprop。如果你想使用它,你需要将itemprop包装在合适的项目中。适用的项目有:产品,品牌,优惠,活动,组织,地点,服务,CreativeWork。这些项指定了一个aggregateRating属性,该属性可以包含AggregateRating。
<div itemscope itemtype="http://schema.org/Product">
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">5</span> stars - based on <span itemprop="reviewCount">21</span> reviews
</div>
<!-- other Product properties -->
</div>
使用AggregateRating的itemReviewed属性,指定评级所关注的事物。如果您使用此代码,请不要忘记从问题中的代码中删除itemprop。
<div itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">5</span> stars - based on <span itemprop="reviewCount">21</span> reviews
<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product">
<!-- Product properties -->
</div>
</div>
答案 1 :(得分:1)
您必须使用LocalBusiness架构才能更正此错误。 我的页面收到了相同的错误消息。然后我把所有工作正常后放入LocalBusiness Schema代码。
对于代码示例,您可以转到Schema页面:http://schema.org/LocalBusiness 或者您可以查看我的网站,我有正确的网站。 Didi Designer Studio