Trying to Setup Blog Category Page

Topic summary

A user is attempting to create a custom blog category page featuring a 3-4 image grid that links to different blog types. They’ve written Liquid code for an “Image Grid” section but are encountering an error.

Code Structure:

  • Schema defines settings for title, repeatable image blocks (up to 9), and images per row (1-4)
  • Each image block includes an image picker and link field
  • The Liquid template code appears corrupted or reversed in the post

Current Status:

  • The code keeps producing an error message (specific error not provided)
  • The template logic seems incomplete or malformed, making it difficult to identify the exact issue
  • No responses or solutions have been posted yet

The discussion remains open with the user seeking help to resolve the error and successfully implement the image grid functionality.

Summarized with AI on November 22. AI used: claude-sonnet-4-5-20250929.

Hello! I am trying to setup a blog category page for www.usroast.com, one that will have a grid of 3-4 pictures that will link to our different blog types. I’ve come up with one but it keeps giving me the same error message:

{% schema %}
{
“name”: “Image Grid”,
“settings”: [
{
“type”: “text”,
“id”: “title”,
“label”: “Title”,
“default”: “Image Grid”
},
{
“type”: “group”,
“id”: “image_blocks”,
“label”: “Image Blocks”,
“info”: “Add up to 9 image blocks.”,
“repeatable”: true,
“max_items”: 9,
“settings”: [
{
“type”: “image_picker”,
“id”: “image”,
“label”: “Image”
},
{
“type”: “text”,
“id”: “link”,
“label”: “Link”
}
]
},
{
“type”: “range”,
“id”: “images_per_row”,
“label”: “Images per row”,
“default”: 3,
“min”: 1,
“max”: 4,
“step”: 1
}
]
}
{% endschema %}

{% assign images_per_row = section.settings.images_per_row %}
{% assign image_blocks = section.settings.image_blocks %}
{% assign rows = image_blocks.size | divided_by: images_per_row %}

{{ section.settings.title }}
{% for row in (1..rows) %}
{% for i in (1..images_per_row) %} {% assign index = (row - 1) * images_per_row | plus: i | minus: 1 %} {% if index < image_blocks.size %} {% assign block = image_blocks[index] %} {% if block.image != blank %} {% endif %} {% endif %} {% endfor %}
{% endfor %}

Thanks!