Product categories at schema.org?

Use as a link: https://support.google.com/webmasters/answer/146750?hl=en

In the "Product" section, you will notice that there is a category property, and in addition, there is an example at the bottom of the page:

<span itemprop="category" content="Hardware > Tools > Anvils">Anvils</span> 

which I reproduced for sure:

 <span itemprop="category" content="kitchen sinks > stainless steel sinks > undermount">undermount</span> 

But when I test it with the Google Structured Data Tool, I get an error:

Error: The page contains a category property that is not part of the schema.

I also understood in this example using data-vocabulary.org -> Product, where I use schema.org -> Product.

Now http://schema.org/Product , it has no category, wherever it is mentioned. Does schema.org not offer categories? Or am I missing something?

+6
source share
3 answers

category - item prop scheme / Offer, not scheme / Product

To fix the problem, put the offer in the product and attach the category to the offer.

+4
source

Note. You use the content attribute on the span , which is not valid in HTML5 or Microdata ( but in RDFa ).

Schema.org has a category property, but it cannot be used on Product . Depending on your content, you can use Offer instead of Product (see also my answer with an example using category ).

+3
source
 <meta itemprop="category" content="Hardware > Tools > Anvils > Anvils" /> 

Here is the correct format adopted by schema.org ...

0
source

Source: https://habr.com/ru/post/954687/


All Articles