Shopify pagination not working on collection

 {%- paginate collection.products by section.settings.products_per_page -%}
        {%- if collection.products.size == 0 -%}
          <div class="collection collection--empty page-width" id="product-grid" data-id="{{ section.id }}">
            <div class="loading-overlay gradient"></div>
            <div class="title-wrapper center">
              <h2 class="title title--primary">
                {{ 'sections.collection_template.empty' | t }}<br>
                {{ 'sections.collection_template.use_fewer_filters_html' | t: link: collection.url, class: "underlined-link link" }}
              </h2>
            </div>
          </div>
        {%- else -%}
          <div class="collection{% if section.settings.filter_type != 'vertical' %} page-width{% endif %}">
            <div class="loading-overlay gradient"></div>
    
            <ul id="product-grid" data-id="{{ section.id }}" class="
              grid product-grid grid--1-col-tablet-down
              grid--{{ section.settings.columns_desktop }}-col-desktop">
              {%- for product in collection.products -%}
           {% assign lazy_load = false %}
                {%- if forloop.index > 2 -%}
                  {%- assign lazy_load = true -%}
                {%- endif -%}
                <li class="grid__item">
                  {% render 'card-product',
                    card_product: product,
                    media_aspect_ratio: section.settings.image_ratio,
                    show_secondary_image: section.settings.show_secondary_image,
                    show_vendor: section.settings.show_vendor,
                    show_rating: section.settings.show_rating,
                    lazy_load: lazy_load,
                    show_quick_add: section.settings.enable_quick_add,
                    section_id: section.id,
                    image_swatches: section.settings.image_swatches,
                  	button_swatches: section.settings.button_swatches
                  %}
                </li>
              {%- endfor -%}
            </ul>
    
            {%- if paginate.pages > 1 -%}
              {% render 'pagination', paginate: paginate, anchor: '' %}
            {%- endif -%}
          </div>
        {%- endif -%}
      {%- endpaginate -%}

Not sure why this isn’t working, but with ?page=1 or ?page=2 or ?page=3 in the URL I get back the same products.

what theme?

you should reset the collection back to the original code and see if it fixes it

Hi @colbymchenry

Can you kindly let me know what theme you’re using? It would be easier for us to check it.

Facing the same issue in the Dawn theme. Did you find any solution to this?

It seems that the paginate liquid object is not working as expected. Or maybe we are overlooking some things.