plugin-icon

Module Pager

作者:yama-dev·
Create customizable pagination by editing HTML templates in the WordPress admin screen.
版本
1.7.0
活跃安装
20
最后更新
Jul 30, 2026

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.

免费基于付费套餐
通过安装,您同意 WordPress.com 服务条款第三方插件条款
目前已测试版本
WordPress 7.0.2
这个插件是可用的下载,适用于您的站点。