gpt4 book ai didi

google-search-console - 错误 : "The property offers is not recognized by Google for an object of type Offer" in Structured data

转载 作者:行者123 更新时间:2023-12-02 05:20:03 29 4
gpt4 key购买 nike

我已将以下 html 代码添加到我们网站之一的产品页面中:

<div itemtype="http://schema.org/Offer" itemscope="" itemprop="offers">
<div class="product-type-data">
<div itemtype="http://schema.org/Offer" itemscope="" itemprop="offers" class="price-box">
<span id="product-price-118" class="regular-price">
<span itemprop="price" class="price">30,00&nbsp;€</span>
</span>
</div>

<p class="availability in-stock">Verfügbarkeit: <span>Auf Lager</span></p>
<meta content="http://schema.org/InStock" itemprop="availability">
<div class="clearfix"></div>
</div>
<meta content="EUR" itemprop="priceCurrency">
<meta content="30" itemprop="price">

在网站管理员工具中进行测试时,我在结构化数据中收到错误消息:“Google 无法识别该属性提供的类型为 Offer 类型的对象”(仅适用于具有类“price-box”的 div)。

我还在这里附上了网站管理员的错误快照。
enter image description here
有人能指出我出错的正确方向吗?

谢谢

最佳答案

我知道这是一个老问题,但我想回应以防其他人需要答案。我还将假设报价是针对产品的(这不是必需的,但对大多数人来说可能很常见)。

首先,我想引用一些资源来阅读有关该主题的内容。

https://schema.org/

Google Structured Data Test Tool

Google Product Reference

我还想澄清这个问题与微数据有关,而不是 JSON-LD,所以我会用微数据格式来回应。

我相信你的问题是你在“优惠”中有一个“优惠”。试试这个代码:

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<div class="product-type-data">
<div class="price-box">
<span id="product-price-118" class="regular-price">
<span class="price">30,00&nbsp;€</span>
</span>
</div>
<p class="availability in-stock">Verfügbarkeit: <span>Auf Lager</span></p>
<div class="clearfix"></div>
</div>
<meta content="http://schema.org/InStock" itemprop="availability">
<meta content="30" itemprop="price">
<meta content="EUR" itemprop="priceCurrency">
</div>

如果你把上面的代码放到google测试工具中,它就会验证。

如果您想要另一个示例,请转到上面的 google 产品引用链接,然后在示例部分(单一产品页面)中选择微数据选项卡,然后选择“查看标记”。这将为您提供更完整的示例。我已将其包含在下面,以防谷歌删除此代码。
<div itemtype="http://schema.org/Product" itemscope>
<meta itemprop="mpn" content="925872" />
<meta itemprop="name" content="Executive Anvil" />
<link itemprop="image" href="https://example.com/photos/16x9/photo.jpg" />
<link itemprop="image" href="https://example.com/photos/4x3/photo.jpg" />
<link itemprop="image" href="https://example.com/photos/1x1/photo.jpg" />
<meta itemprop="description" content="Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height." />
<div itemprop="offers" itemtype="http://schema.org/Offer" itemscope>
<link itemprop="url" href="https://example.com/anvil" />
<meta itemprop="availability" content="https://schema.org/InStock" />
<meta itemprop="priceCurrency" content="USD" />
<meta itemprop="itemCondition" content="https://schema.org/UsedCondition" />
<meta itemprop="price" content="119.99" />
<meta itemprop="priceValidUntil" content="2020-11-05" />
<div itemprop="seller" itemtype="http://schema.org/Organization" itemscope>
<meta itemprop="name" content="Executive Objects" />
</div>
</div>
<div itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating" itemscope>
<meta itemprop="reviewCount" content="89" />
<meta itemprop="ratingValue" content="4.4" />
</div>
<div itemprop="review" itemtype="http://schema.org/Review" itemscope>
<div itemprop="author" itemtype="http://schema.org/Person" itemscope>
<meta itemprop="name" content="Fred Benson" />
</div>
<div itemprop="reviewRating" itemtype="http://schema.org/Rating" itemscope>
<meta itemprop="ratingValue" content="4" />
<meta itemprop="bestRating" content="5" />
</div>
</div>
<meta itemprop="sku" content="0446310786" />
<div itemprop="brand" itemtype="http://schema.org/Thing" itemscope>
<meta itemprop="name" content="ACME" />
</div>
</div>

关于google-search-console - 错误 : "The property offers is not recognized by Google for an object of type Offer" in Structured data,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37203124/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com