I wanted something I could quickly copy/paste for showing results, so I put together this Twig snippet and I thought I’d share.
When setting your per page count (16 in this example), it’ll calculate the X-Y numbers that you’re on based upon the total result count and the page that you’re on.
{% set per_page = 16 %}
{% set current_page = query.current_page|default(1) %}
{% set total = looper.found_posts|default(0) %}
{% if total > 0 %}
{% set start = ((current_page - 1) * per_page) + 1 %}
{% set end = current_page * per_page %}
{% if end > total %}
{% set end = total %}
{% endif %}
{% set total_pages = (total / per_page)|round(0, 'ceil') %}
{% else %}
{% set start = 0 %}
{% set end = 0 %}
{% set total_pages = 0 %}
{% endif %}
Showing {{ start }}-{{ end }} of {{ total }} Results

