Great question — answering as the UphillTech team:
I think you can use this code, this is for the Product in the collection page but you need to replace Classes and rename variables and use for blog posts. Go to your collection template and find this code section <ul class="grid grid--uniform{% if collection.products_count > 0 %} grid--view-items{% endif %}"> {% for product in collection.products %} add class and date: data-next-url="{{paginate.next.url}}" class="products-on-page" example: <ul data-next-url="{{paginate.next.url}}" class="products-on-page grid grid--uniform{% if collection.products_count > 0 %} grid--view-items{% endif %}"> second html code end of the tag find this code: {% else %} {%- assign is_empty_collection = true -%}...
Full answer by Ardijan Thaçi: https://stackoverflow.stackexchange.com/a/74635072 (CC BY-SA 4.0).
Need it done for your business? UphillTech.