Structured Data Issues issues for breadcrumb schema - Trying Everything (Nearly)

DEATHGROUND
Excursionist
22 0 3

So I can see there is an unparsable structured data issue on my site, but I keep tweaking the code in the liquid file and getting nowhere.

DEATHGROUND_0-1599340451562.png

Does anyone know where I am going wrong.

 

<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement":[{


"@type": "ListItem",
"position": 1,
"item": {
"@id": "https://vapeology.com",
"name": "Homepage"
}
},


]
}
</script>

 

Any help massively appreciated

0 Likes
go4it
New Member
4 0 0

try to remove the very last comma  (before the [  )

<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement":[{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "https://vapeology.com",
"name": "Homepage"
}
}
]
}

you can put it the snippet testing tool: https://search.google.com/structured-data/testing-tool/u/0/

and select "Code snippet"

-- this is what I put in the breadcrumb.liquid ( using minimal - based on your theme you might have to put in a different place)

 

  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "item": {
          "@id": "{{ shop.url }}",
          "name": "{{ 'general.breadcrumbs.home' | t }}"
        }
      },
      {
        "@type": "ListItem",
        "position": 2,
        "item": {
          {% if collection %}
            "@id": "{{ collection.url }}",
            "name": "{{ collection.title }}"
          {% else %}
            "@id": "{{ routes.all_products_collection_url }}",
            "name": "{{ collections.all.title }}"
          {% endif %}
        }
      },
      {
        "@type": "ListItem",
        "position": 3,
        "item": {
          "@id": "{{ product.url }}",
          "name": "{{ product.title | escape }}"
        }
      }
    ]
  }
</script>

 

 

resulting in ( for a pintail longboard at https://longboardsusa.com/products/bamboo-pintail-tiki-man-44-longboard-complete )

 

<script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "item": {
          "@id": "https://longboardsusa.com",
          "name": "Home"
        }
      },
      {
        "@type": "ListItem",
        "position": 2,
        "item": {
          
            "@id": "/collections/pintail-longboard",
            "name": "Pintail Longboards"
          
        }
      },
      {
        "@type": "ListItem",
        "position": 3,
        "item": {
          "@id": "/products/bamboo-pintail-tiki-man-44-longboard-complete",
          "name": "Bamboo Pintail Tiki Man 44&quot; Longboard"
        }
      }
    ]
  }
</script>

 

 

hope that helps a bit.

0 Likes
DEATHGROUND
Excursionist
22 0 3
Hi there

Remove the comma after 'breadcrumblist' ?

That's standard practise for all schema, comma after the type.

The issue seems to be with the ] or absence, or position of it

David
0 Likes