Cookie Consent by Free Privacy Policy Generator

Add ItemList schema for a Shopify blog lister (blog category) page

Here’s the ItemList schema for a Shopify blog lister (blog category) page. This allegedly helps structure your content so that search engines can better understand it, making it easier for users to find relevant articles. I have seen no evidence of this actually making a difference for blog category listing pages, hence the comment "allegedly."

This assumes you have the following in place:​

  • blogs.frontpage.articles should be replaced with the correct variable path if your blog collection has a different name.
  • article.image.src assumes each blog post has an associated image. If not, you’ll need to adjust or remove this line.
Code:
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "ItemList",
  "itemListElement": [
    {% for article in blogs.frontpage.articles %}
    {
      "@type": "ListItem",
      "position": {{ forloop.index }},
      "url": "{{ shop.url }}{{ article.url }}",
      "item": {
        "@type": "Article",
        "name": "{{ article.title | escape }}",
        "image": "{{ article.image.src | img_url: 'master' }}",
        "description": "{{ article.excerpt_or_content | strip_html | escape }}"
      }
    }{% unless forloop.last %},{% endunless %}
    {% endfor %}
  ]
}
</script>
 
Back
Top