# Product grid

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FhIFPLPKwnxKC0lYXzU9q%2FFox-BG%20Light%20(67).jpg?alt=media&#x26;token=fbf33208-3cca-4901-b1dd-379b5df1b29c" alt=""><figcaption></figcaption></figure>

The **Product grid** section powers the display of your collection’s products. It’s where shoppers browse, filter, and sort items based on their preferences — all with a layout optimized for performance, flexibility, and mobile responsiveness.

## How to navigate to the Product grid

{% hint style="success" %}
Steps

1. In the theme editor (**Customize**), open the template selector.
2. Select **Collections**, then **Default collection.**
3. On the left sidebar, locate **Product grid**
4. Make necessary changes **> Save.**
   {% endhint %}

## How to edit a Product grid

### 🔧 General and layout

<table><thead><tr><th width="260">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Products per page</strong></td><td>Set the total number of products shown per page (6-50 products).</td></tr><tr><td><strong>Products per row</strong></td><td>Choose how many products display in each row (2–4 recommended).</td></tr><tr><td><strong>Column gap / Row gap</strong></td><td>Adjust spacing between items.</td></tr><tr><td><strong>Show product count</strong></td><td>Display total number of products.</td></tr></tbody></table>

### 🔍 Filtering and Sorting

Allow your customers to filter collections and search results by product availability, price, color, and more.&#x20;

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FTp61ApcHDzFAmRwEttCu%2Fimage.png?alt=media&#x26;token=959d8b80-8177-4e25-8163-d8444fcd03d3" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="260">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Enable filtering</strong></td><td>Activate Shopify’s storefront filters.<br>Learn <a href="https://help.shopify.com/manual/online-store/storefront-search/search-and-discovery-filters">how to customize filters</a> </td></tr><tr><td><strong>Enable sorting</strong></td><td>Allow sorting by options like price, newest, best-selling, etc.</td></tr><tr><td><strong>Desktop filter layout</strong></td><td><p>Choose:<br>- Left sidebar:<br><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FZYzLDQw1nSCYLB8WfdLj%2Fimage.png?alt=media&#x26;token=fee2c8a0-efe1-4bcc-a35a-09611f280942" alt=""><br><br>- Right sidebar:</p><p><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2F7B6nuy8bqUd9XOIuoktn%2Fimage.png?alt=media&#x26;token=02637193-0d8b-400e-aa9d-c5bf01e3b54d" alt=""><br><br>- Drawer:<br><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FnB1G1R538SfqWU6VlbHB%2Fimage.png?alt=media&#x26;token=09426a01-317e-4576-ae22-07e3d4670b4e" alt=""></p></td></tr><tr><td><strong>Group collapsible</strong></td><td>Group filters in collapsible dropdowns.<br><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FwGYcAo9OhImvEBwiwz91%2Fimage.png?alt=media&#x26;token=3ff78c45-34a4-4f1b-beec-d9d57ba08122" alt=""></td></tr><tr><td><strong>Default state</strong></td><td>Set filters as <code>Collapsed</code> or <code>Expanded</code> on load.</td></tr><tr><td><strong>Open first group by default</strong></td><td>If checked, the first filter group expands on page load.</td></tr><tr><td><strong>Group heading size</strong></td><td>Choose heading font size (Small, Medium, Large).</td></tr><tr><td><strong>Show results count</strong></td><td>Show how many results match the filters.<br><br><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2F7Ep4WLg1tKdvg2EXCsMU%2Fimage.png?alt=media&#x26;token=f3406eb8-ddb0-4774-84a6-3cf0d49acf95" alt=""></td></tr><tr><td><strong>Filter color type</strong></td><td>Choose between <code>Inline</code> color swatches or <code>List</code> view.</td></tr></tbody></table>

{% tabs %}
{% tab title="Inline" %}

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FcTZnyjm3bFSu0s1fIe3a%2Fimage.png?alt=media&#x26;token=44c11491-913f-4898-bd28-0c02d85c80c8" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="List" %}

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FVqR56nMrkmVhYhhgDtnC%2Fimage.png?alt=media&#x26;token=5776a7a0-dda6-43dd-a773-2137b285fe8c" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

<details>

<summary>How to create visual filters</summary>

Filter values can include visual elements such as colors, patterns, or more creative imagery.&#x20;

For example, a *Fabric color* filter can display a small color swatch for each filter value.

To create visuals with your filter values, set up custom data for your store with [metafields](https://help.shopify.com/en/manual/custom-data/metafields/metafield-definitions/creating-custom-metafield-definitions) and [metaobjects](https://help.shopify.com/en/manual/custom-data/metaobjects/using-metaobjects). You also need to meet the [requirements](https://help.shopify.com/en/manual/online-store/search-and-discovery/filters#visual-filters).

{% hint style="info" %}
Product variant filters will link to more relevant variants on search results and collection pages.
{% endhint %}

#### Now we will start from scratch by defining the [metaobjects](https://help.shopify.com/en/manual/custom-data/metaobjects/using-metaobjects):

1. Go to **Settings** > **Custom data** > Find the **Metaobject definitions** field > Click **Add definition.**

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FXl1bKmZf3sTUWmlA49N3%2Fimage.png?alt=media&#x26;token=2e3613f6-1d1e-42af-a56f-f22f6ee6d17d" alt=""><figcaption></figcaption></figure>

2. In the **Add metaobject definition** page, give this metaobject a **Name** (Color) and 3 **Fields:**
   * **Single line text** - For the color name (Name).
   * **Color** - For the hex code of the actual color (Hexcode).
   * **File** - For the image of this color (Image).

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FvgnsC2mMyIFteLhBEjMn%2Fimage.png?alt=media&#x26;token=15e27530-3717-4a9b-a30a-25449fb49ba6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
A metaobject definition for a color swatch should have both a color and an image field.&#x20;

You don't need to provide a value for both, but this will give you the option of using either field in the future.
{% endhint %}

3. Click **Save**.

#### Next step, we will create the colors list:

1. In the Shopify admin sidebar, go to the **Content** > **Metaobjects** > In the **Metaobjects** page, select **Color**.

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FDwu7v8WHSNbNXExzQjpv%2Fimage.png?alt=media&#x26;token=349486b2-a9ad-4473-bf1f-6e2c3e0083c5" alt=""><figcaption></figcaption></figure>

2. Click the **Add entry** button to add a new color. Give the color entry the Name, Color, and Image.&#x20;

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FsX3nteV82dSVg7D1E1oS%2Fimage.png?alt=media&#x26;token=43b953f9-9b01-4e85-b6a5-9d75debdda36" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note**: You can add many color entries and assign these colors to the products.
{% endhint %}

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FKYH0Bqzu08E1GsjLIgBx%2Fimage.png?alt=media&#x26;token=9145051e-0285-40b3-98f7-655660b03c2d" alt=""><figcaption></figcaption></figure>

3. Click **Save**.&#x20;

#### After that, we are going to create color [metafields](https://help.shopify.com/en/manual/custom-data/metafields/metafield-definitions/creating-custom-metafield-definitions) for the products to link to these [metaobjects](https://help.shopify.com/en/manual/custom-data/metaobjects/using-metaobjects) that we've just created above:

1. Go to **Settings** > **Custom data** > In the **Metafield definitions** field, select **Products** > Click **Add definition.**

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2F12xUDgDUc9VzKiZKPQDb%2Fimage.png?alt=media&#x26;token=c326d33b-0802-4864-bc1c-dfd748f07f8e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2F1gQbd06I5l8Zqq98KH9Y%2Fimage.png?alt=media&#x26;token=118a4e1c-5f26-43d7-84fb-a8b71ddc72d2" alt=""><figcaption></figcaption></figure>

2. We will define this metafield as **Name**: "Color filter swatch" and **Type**: "Metaobject". In the **Reference** field, select the metaobject you want or you've just created (Color).

{% hint style="info" %}
If your products/ variants have multiple colors you could filter on, set your metafield definition to allow a **List of entries**.&#x20;

This lets you assign multiple metaobject entries to a single item and each one will display as a filter value on your store.
{% endhint %}

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FRfHXIehgwqZu7sQx4J6q%2Fimage.png?alt=media&#x26;token=85db905d-d185-4e52-a8f8-46c387f19710" alt=""><figcaption></figcaption></figure>

3. Click **Save.**

#### Then, we will connect the products to colors:

1. In the Shopify admin sidebar, go to the **Products** > Select the product you want to connect color metafield.
2. In the **Metafields** field, click on the "Color filter swatch" metafield that you've just created above > You will be able to select multiple colors from your list of colors that you defined using metaobjects.

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FB8HQzjSWaVzaw48HBL3t%2Fimage.png?alt=media&#x26;token=b52461ca-f880-429b-bcaa-fc49f2b7ed65" alt=""><figcaption></figcaption></figure>

3. Click **Save**.

#### After you have assigned your metafield to products or variants in your store, you can set up the filter for your online store:

1. In the  [Shopify Search & Discovery](https://apps.shopify.com/search-and-discovery) app, go to **Filters**.
2. Click **Add filter** or click an existing filter.
3. Click the **Source** field, and then select a metafield filter with a metaobject reference - "Color filter swatch".
4. Click **Display options**.
5. Set the **Label** field for filter values by selecting a metafield.
6. Check **Include visual** and select a visual style:
   * Choose **Swatch** for small color swatches or patterns. Set the swatch content by selecting:
     * A color field for the **Swatch color**.
     * An image field for the **Swatch pattern**.

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2F89nuqEj3YCaNVMxUmXwZ%2Fimage.png?alt=media&#x26;token=0289a22f-43ff-41a8-8c53-193f259322a0" alt=""><figcaption></figcaption></figure>

* Choose **Image** for icons, logos, or other graphics that shouldn't be cropped. Set the content by selecting an image field for the **Image**.

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FYsmF0YbWumVQUHuK8ylZ%2Fimage.png?alt=media&#x26;token=237c86ac-4def-4219-9c90-0c48ff51fab1" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Tip**

Themes will often prioritize displaying a swatch's image over its color. For swatch displays, if you selected fields for both **Swatch pattern** and **Swatch color**, then the color is typically only displayed when there isn't an available pattern image for the filter value.
{% endhint %}

7. Click **Save**.

</details>

<details>

<summary>How to customize filters</summary>

{% hint style="info" %}
Customizing the filters in your store requires the [Shopify Search & Discovery](https://apps.shopify.com/search-and-discovery) app.&#x20;

The app also allows you to customize search results and product recommendations to give you more control over how customers discover your products.&#x20;

Learn how to [customize filters with the app](https://help.shopify.com/en/manual/online-store/search-and-discovery/filters).
{% endhint %}

1. Go to **Apps** > **Search & Discovery** > **Filters** > **Add filter**

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FQwwaXnMQ0Lvhsrwpm5r9%2Fimage.png?alt=media&#x26;token=611c90a6-fdd1-4f6d-b535-9cb8c0967873" alt=""><figcaption></figcaption></figure>

2. Add or remove filters to show/hide from the storefront filters > **Save** the settings.
3. In the theme editor (**Customize**), open the template selector > Select **Collections** > **Default collection.**
4. On the left-sidebar, locate **Product gird** > Select **Enable filtering** checkbox
5. **Save.**

</details>

### 🔁 Pagination

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FAJMXYKI0K6AbVhPdtSRM%2Fimage.png?alt=media&#x26;token=4554253e-210a-401b-a9fb-a706585d2cfa" alt=""><figcaption></figcaption></figure>

Enable pagination in 3 ways:

{% tabs %}
{% tab title="Paging by numbers" %}

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FZ2LfC0utpQWTUjApk02Z%2Fpaging_by_numbers.jpg?alt=media&#x26;token=41aad082-3229-44ef-959b-8fcd0cf5802c" alt="Collection page: Paging by numbers example"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Load more button" %}

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FA7pcyHIvaalZ6Z7dH3Ii%2Fload_more_button.jpg?alt=media&#x26;token=7df9e232-312f-4b51-8e88-1b669bd5423e" alt="Collection page: Load more button example"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Infinite scroll" %}

<figure><img src="https://1836495117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOdebKCa6IK9qfbdvSKj0%2Fuploads%2FtLyj07FcidSoucFXBMqP%2Finfinite_scrolling.gif?alt=media&#x26;token=1e4066b9-bdbb-4ec3-8b27-1db1257923b0" alt="Collection page: Infinite scroll example"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}
