谷歌结构化数据测试工具在我的Schema.org实现中出现了几个星期以来的错误:
属性Organization/agregateRating未被Google识别对于Organization类型的对象。
这里怎么了?
HTML看起来是这样的:
<div itemscope itemtype="http://data-vocabulary.org/Organization">
<section class="entry-header" itemprop="aggregateRating" itemscope="itemscope" itemtype="http://schema.org/AggregateRating">
<span itemprop="itemReviewed" itemscope itemtype="http://schema.org/LocalBusiness"> <h2 itemprop="name">BUSINESS NAME</h2> </span>
<span itemprop="ratingValue">5,0</span> </span> <span class="reviews"> <span class="count" itemprop="reviewCount">4</span>
.... other things here ....
</section>
</div>
这里少了什么?我做错了什么?
您正在使用两个不同的词汇表:
-
数据词汇.org/strong>中的
Organization
类型 -
Schema.org/strong>中的
AggregateRating
类型和LocalBusiness
类型
虽然允许使用不同词汇表中的类型,但您可能打算使用Schema.org而不是Data-Vocabulary.org,因为aggregateRating
属性是为Schema.org的Organization
定义的,而不是为Data-Verbulary.org的Organization
定义的。
所以不是
<div itemscope itemtype="http://data-vocabulary.org/Organization">
它将是
<div itemscope itemtype="http://schema.org/Organization">
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">4</span>
<span itemprop="bestRating">5</span>
<span itemprop="reviewCount">2</span>
</div>
试试这个标记。
div itemprop="aggregateRating" itemtype="https://schema.org/AggregateRating" itemscope>
<meta itemprop="reviewCount" content="Total Review Count i.e. 567" />
<meta itemprop="ratingValue" content="Rating Value i.e. 4.7" />
</div>