Dan*_*eph 6 microdata schema.org google-rich-snippets
我在Google Rich Snippets Tool中检查了我网站的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>
Run Code Online (Sandbox Code Playgroud)
grg*_*grg 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>
Run Code Online (Sandbox Code Playgroud)使用AggregateRating的itemReviewed属性,指定评级所关注的Thing.如果您使用此代码,请不要忘记从问题中的代码中删除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>
Run Code Online (Sandbox Code Playgroud)| 归档时间: |
|
| 查看次数: |
7817 次 |
| 最近记录: |