Categories for Product in schema.org?
Asked Answered
R

4

6

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

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>

which I've mimic'd exactly:

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

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.

I realized in the example also, it's using data-vocabulary.org→Product, where I'm using schema.org→Product.

Now on http://schema.org/Product, it does not have category anywhere mentioned. Does schema.org not offer categories? Or am I missing something?

Rwanda answered 26/9, 2013 at 15:2 Comment(2)
I am having the same problem. Have you found a solution? Note that you are not using a category listed by Google: google.com/basepages/producttype/taxonomy.en-US.txtProprietor
category is now a property of Product: schema.org/ProductWinger
Q
4

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.

Quintuplicate answered 10/1, 2014 at 2:46 Comment(1)
I am not sure if this has changed since the answer was given but I am wondering as I can see under "Used on these types" > "Product" … I would say it's a property of schema/Product, or did I misread the documentation: schema.org/category?Sanborn
W
4

Note: You are using a content attribute on span, which is not valid in HTML5 or Microdata (but in RDFa).

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

Wrapped answered 18/4, 2014 at 21:21 Comment(0)
P
1

I've been working on JSON-ld & microdata a lot recently, and I believe in your case 'category' needs to be placed in a meta tag, not span/div tag, preferably before your item. Logically, your need to identify 'undermount' is redundant as it would already be included within your content. Oddly, the schema type service has 'serviceType' as a property, but product does not have an equivalent, otherwise that could have been another workaround. For your content 'undermount' use itemprop="name" within your span, no content within that tag necessary.

Panlogism answered 18/8, 2018 at 2:48 Comment(0)
L
0
<meta itemprop="category" content="Hardware > Tools > Anvils > Anvils" />

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

Limpid answered 23/3, 2016 at 7:18 Comment(1)
link to source?Cutting

© 2022 - 2024 — McMap. All rights reserved.