Title: Module Pager
Author: yama-dev
Published: <strong>02 September 2022</strong>
Last modified: 30 July 2026

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/module-pager.svg)

# Module Pager

 De [yama-dev](https://profiles.wordpress.org/yamadev/)

[Download](https://downloads.wordpress.org/plugin/module-pager.1.7.0.zip)

 * [Details](https://lij.wordpress.org/plugins/module-pager/#description)
 * [Reviews](https://lij.wordpress.org/plugins/module-pager/#reviews)
 *  [Installation](https://lij.wordpress.org/plugins/module-pager/#installation)
 * [Development](https://lij.wordpress.org/plugins/module-pager/#developers)

 [Supòrto](https://wordpress.org/support/plugin/module-pager/)

## Description

Module Pager displays pagination that can be adapted to your site’s design.

The Pagination Settings screen lets you edit separate HTML templates for the complete
pager, previous link, next link, and page numbers.

#### Features

 * Edit pagination HTML from the WordPress admin screen.
 * Start with default templates that work immediately after activation.
 * Configure the previous and next links separately.
 * Use Mustache syntax to render page numbers and conditional states.
 * Restrict the HTML elements and attributes that can be saved.
 * Render pagination with a shortcode or from a theme’s PHP template.

#### Shortcode

Add the shortcode where the main query’s pagination should appear.

    ```
    [wp-module-pager]
    ```

Use `base_path` to specify the base path for pagination URLs.

    ```
    [wp-module-pager base_path="news"]
    ```

Use `post_type` when the post type needs to be specified explicitly.

    ```
    [wp-module-pager post_type="news" base_path="news"]
    ```

#### PHP API

The following example renders pagination for the current main query from a theme
template.

    ```
    <?php
    $pager = new Wp_Module_Pager();
    $pager->render();
    ```

A custom `WP_Query` object, post type, and base path can also be passed to `render()`.

    ```
    <?php
    $pager = new Wp_Module_Pager();
    $pager->render( $custom_query, 'news', 'news' );
    ```

No pagination is rendered when the query has only one page.

## Installation

 1. Open Plugins > Add New Plugin in the WordPress admin screen.
 2. Search for “Module Pager” and install it.
 3. Activate the plugin.
 4. Review the default templates under Pagination Settings.
 5. Add the shortcode or PHP call where pagination should appear.

To install a ZIP file, use Upload Plugin on the Add Plugins screen.

## FAQ-e

### Why is the pagination not displayed?

Confirm that the target query contains enough posts to produce multiple pages.

The plugin does not output pagination for a single-page query.

### Can the templates be restored to their defaults?

Select “Reset to defaults” on the Pagination Settings screen, and then save the 
settings.

### Can I use a custom WP_Query?

Pass the `WP_Query` object as the first argument of the PHP API’s `render()` method.

The shortcode uses the WordPress main query.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Module Pager” is open source software. The following people have contributed to
this plugin.

Contributors

 *   [ yama-dev ](https://profiles.wordpress.org/yamadev/)

[Translate “Module Pager” into your language.](https://translate.wordpress.org/projects/wp-plugins/module-pager)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/module-pager/), check
out the [SVN repository](https://plugins.svn.wordpress.org/module-pager/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/module-pager/) by
[RSS](https://plugins.trac.wordpress.org/log/module-pager/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.7.0

 * Updated Mustache to version 3.
 * Added test environments for WordPress 7.0 and PHP 8.5.
 * Added automated tests for PHP 7.4 and PHP 8.5.
 * Fixed the shortcode to return its rendered HTML correctly.
 * Improved handling when the query string is unavailable or posts per page is zero.
 * Fixed line break preservation and default restoration on the Pagination Settings
   screen.
 * Registered default templates during plugin activation and added safe fallbacks
   for missing settings.
 * Improved JavaScript escaping for templates displayed in the admin screen.
 * Improved input validation and output escaping for Plugin Check compatibility.

## Mêta

 *  Version **1.7.0**
 *  Last updated **4 weeks ago**
 *  Active installations **20+**
 *  WordPress version ** 5.8 or higher **
 *  Tested up to **7.0.4**
 *  PHP version ** 7.2 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/module-pager/)
 * Tags
 * [custom](https://lij.wordpress.org/plugins/tags/custom/)[mustache](https://lij.wordpress.org/plugins/tags/mustache/)
   [navigation](https://lij.wordpress.org/plugins/tags/navigation/)[pager](https://lij.wordpress.org/plugins/tags/pager/)
   [pagination](https://lij.wordpress.org/plugins/tags/pagination/)
 *  [Advanced View](https://lij.wordpress.org/plugins/module-pager/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/module-pager/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/module-pager/reviews/)

## Contributors

 *   [ yama-dev ](https://profiles.wordpress.org/yamadev/)

## Supòrto

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/module-pager/)