3

The product page of my website has a breadcrumb.

The Product type has not breadcrumb.

I do this:

"@type": "Webpage",
"breadcrumb": {...
"mainEntity":
     { 
        "@type": "Product",
        ...

Am I right? (I used "@type": "Webpage" only for breadcrumb)

unor
  • 92,415
  • 26
  • 211
  • 360
Maral
  • 99
  • 1
  • 4
  • 10

2 Answers2

3

Yes, your idea is correct.

As breadcrumbs are part of web pages, not of products, the breadcrumb property is only defined for WebPage.

Note that you must use WebPage instead of Webpage. Schema.org terms are case-sensitive.

For a page with a single product, you can consider using (the more specific) ItemPage instead of WebPage.

unor
  • 92,415
  • 26
  • 211
  • 360
  • I'm still unsure of the final json ld for a product page with breadcrumbs and struggling to find examples. – Abram Oct 26 '18 at 18:10
  • 1
    @Abram: Here is [a full JSON-LD example](https://webmasters.stackexchange.com/a/99999/17633) with `WebPage` and `BreadcrumbList`. For the `Product`, you would simply add it as value to the `WebPage`’s `mainEntity` property. – unor Oct 27 '18 at 13:22
  • 1
    Apparently you cannot add BreadcrumbList to Product, so I had to use @graph to accomplish this. – Abram Oct 28 '18 at 02:30
  • 1
    @Abram: Yes, you can’t add it to `Product`, but (what this question here is about) you can add it to `WebPage`. So the best solution is to use `WebPage`, and add the `BreadcrumbList` and the `Product` to it. – unor Oct 28 '18 at 18:44
  • @unor How to connect breadcrumb to Webpage, if I choose not to declare breadcrumb within Webpage (ie when breadcrumb in a separate json-ld script)? I was thinking that we can use isPartOf, but looking up schema.org for breadcrumb doesn't show this property. – Ethan Jun 06 '19 at 20:03
  • @Ethan: Please ask this as a question (showing the JSON-LD you have). The comment section isn’t a suitable place for this. – unor Jun 06 '19 at 22:38
0

According to schema.org documentation for breadcrumb you can use BreadcrumbList. So something like this:

{
    "@context": "http://schema.org",
    "@type": "WebPage",
    "breadcrumb": {
        "@type": "BreadcrumbList",
        "itemListElement": [{
            "@type": "ListItem",
            "position": 1,
            "item": {
                "@id": "https://example.com/dresses",
                "name": "Dresses"
            }
        }, {
            "@type": "ListItem",
            "position": 2,
            "item": {
                "@id": "https://example.com/dresses/real",
                "name": "Real Dresses"
            }
        }]
    }
}
hatef
  • 5,491
  • 30
  • 43
  • 46