schema.org 中的产品类别? [英] Categories for Product in schema.org?
问题描述
用作参考:https://support.google.com/webmasters/answer/146750?hl=zh-CN
您会注意到在产品"下有一个类别属性,此外页面下方还有一个示例:
You will notice under 'Product' that there is a category Property, and furthermore there's an example on down the page:
<span itemprop="category" content="Hardware > Tools > Anvils">Anvils</span>
我完全模仿过:
<span itemprop="category" content="kitchen sinks > stainless steel sinks > undermount">undermount</span>
但是,当我使用 Google 的结构化数据工具对其进行测试时,出现错误:
Yet when I test it with Google's structured data tool, I get the error:
错误:页面包含不属于架构的属性类别".
Error: Page contains property "category" which is not part of the schema.
我也在示例中意识到,它使用的是 data-vocabulary.org→Product,其中我使用的是 schema.org→Product.
I realized in the example also, it's using data-vocabulary.org→Product, where I'm using schema.org→Product.
现在在 http://schema.org/Product 上,它没有任何提及的类别.schema.org 不提供类别吗?还是我遗漏了什么?
Now on http://schema.org/Product, it does not have category anywhere mentioned. Does schema.org not offer categories? Or am I missing something?
推荐答案
category 是 schema/Offer 的 itemprop,而不是 schema/Product
category is an itemprop of schema/Offer, not schema/Product
要解决您的问题,请在产品中放置优惠,并将类别附加到优惠中.
To fix your problem, place an offer within the product, and attach the category to the offer.
这篇关于schema.org 中的产品类别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!