Pager

Overview

The pager facet type lets you easily display pagination, result counts, a “load more” button, or a “per page” box.

Available Options (Page Numbers)

Name Description
Inner size The number of pages to display on each side of the current page
Dots label The placeholder between the inner and outer pages (leave blank to hide)
Prev button label The “Prev” button label (leave blank to hide)
Next button label The “Next” button label (leave blank to hide)

Available Options (Result Counts)

Name Description
Count text (plural) The plural text. Available placeholders: [lower], [upper], [total], [page], [per_page], [total_pages]
Count text (singular) The “Single result” text
Count text (none) The “No results” text

Available Options (Load More)

Name Description
Load more text The button text
Loading text The button loading text

Available Options (Per Page)

Name Description
Default label Set the default dropdown label, or leave blank.
Per page options A comma-separated list of choices

Displaying raw pager data

You can display raw pager data using PHP within your template files.

Show page number:

<?php echo FWP()->facet->pager_args['page']; ?>

Show “Per page” number:

<?php echo FWP()->facet->pager_args['per_page']; ?>

Show the total number of results:

<?php echo FWP()->facet->pager_args['total_rows']; ?>

Show the total number of pages:

<?php echo FWP()->facet->pager_args['total_pages']; ?>