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.
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
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" Longboard"
}
}
]
}
</script>
hope that helps a bit.
User | Count |
---|---|
25 | |
22 | |
22 | |
19 | |
12 |