Native Pagination not working for CMS items on Production only

Hello, I have CMS items on my page and wanted to paginate them. Using Webflow’s native pagination feature, I noticed it does not work on production. Works fine in Designer mode’s preview and on staging.

Researching on the forums I saw a fix where you uses custom code to make this work:

<!-- Start seamless-pagination custom code -->

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.pjax/2.0.1/jquery.pjax.min.js"></script>
<script>
  var containerSelector = '#seamless-replace';
  $(document).pjax(
    '.w-pagination-wrapper a',
    containerSelector,
    {
      container: containerSelector, 
      fragment: containerSelector,
      scrollTo: false,
      timeout: 2500,
    }
  );
    // These 3 lines should reinitialize interactions
  $(document).on('pjax:end', function() {
    Webflow.require('ix2').init();
  });
</script>

<!-- End seamless-pagination custom code -->

I attached this code to the page’s before tag and made sure to add the ID seamless-replace to the Collection Wrapper in the settings.

Other settings, made sure pagination is turned on to 25 items per page, limit items toggled on.

What am I doing wrong or what needs to happen to make this work? It’s pretty frustrating that something as simple as pagination does not work out the box and that this is a common issue on the webflow forum that touts itself as a “no-code” platform. Would appreciate any help to resolve.

Here is my site Staging link: STAGING LINK
Here is my site Production link: PRODUCTION LINK

1 Like

Hi Becca, Webflow’s pagination is very straightforward. If it’s not working then you likely have added a script that’s conflicting with it.

Scripts don’t run in the designer, which is likely why it’s working there correctly.

It looks like what you’re actually trying to do is to prefetch pages 2+ for faster loading? Have a look at Finsweet List Load instead, it’s designed for Webflow and supports a number of different pagination modes as well like infinite scroll.

1 Like