{"id":161312,"date":"2022-09-02T10:04:53","date_gmt":"2022-09-02T10:04:53","guid":{"rendered":"https:\/\/ja.wordpress.org\/plugins\/module-pager\/"},"modified":"2026-07-30T06:29:18","modified_gmt":"2026-07-30T06:29:18","slug":"module-pager","status":"publish","type":"plugin","link":"https:\/\/ltz.wordpress.org\/plugins\/module-pager\/","author":15456205,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.7.0","stable_tag":"1.7.0","tested":"7.0.2","requires":"5.8","requires_php":"7.2","requires_plugins":null,"header_name":"Module Pager","header_author":"yamadev","header_description":"\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3055\u308c\u305f\u30da\u30fc\u30b8\u30cd\u30fc\u30b7\u30e7\u30f3\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002","assets_banners_color":"","last_updated":"2026-07-30 06:29:18","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/github.com\/yama-dev","rating":0,"author_block_rating":0,"active_installs":20,"downloads":1265,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.7.0":{"tag":"1.7.0","author":"yamadev","date":"2026-07-30 06:29:18"}},"upgrade_notice":{"1.7.0":"<p>This release updates Mustache to version 3 and fixes pagination rendering and settings restoration.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.7.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[527,7149,1753,13194,900],"plugin_category":[43],"plugin_contributors":[213444],"plugin_business_model":[],"class_list":["post-161312","plugin","type-plugin","status-publish","hentry","plugin_tags-custom","plugin_tags-mustache","plugin_tags-navigation","plugin_tags-pager","plugin_tags-pagination","plugin_category-customization","plugin_contributors-yamadev","plugin_committers-yamadev"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/module-pager.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Module Pager displays pagination that can be adapted to your site's design.<\/p>\n\n<p>The Pagination Settings screen lets you edit separate HTML templates for the complete pager, previous link, next link, and page numbers.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Edit pagination HTML from the WordPress admin screen.<\/li>\n<li>Start with default templates that work immediately after activation.<\/li>\n<li>Configure the previous and next links separately.<\/li>\n<li>Use Mustache syntax to render page numbers and conditional states.<\/li>\n<li>Restrict the HTML elements and attributes that can be saved.<\/li>\n<li>Render pagination with a shortcode or from a theme's PHP template.<\/li>\n<\/ul>\n\n<h4>Shortcode<\/h4>\n\n<p>Add the shortcode where the main query's pagination should appear.<\/p>\n\n<pre><code>[wp-module-pager]\n<\/code><\/pre>\n\n<p>Use <code>base_path<\/code> to specify the base path for pagination URLs.<\/p>\n\n<pre><code>[wp-module-pager base_path=\"news\"]\n<\/code><\/pre>\n\n<p>Use <code>post_type<\/code> when the post type needs to be specified explicitly.<\/p>\n\n<pre><code>[wp-module-pager post_type=\"news\" base_path=\"news\"]\n<\/code><\/pre>\n\n<h4>PHP API<\/h4>\n\n<p>The following example renders pagination for the current main query from a theme template.<\/p>\n\n<pre><code>&lt;?php\n$pager = new Wp_Module_Pager();\n$pager-&gt;render();\n<\/code><\/pre>\n\n<p>A custom <code>WP_Query<\/code> object, post type, and base path can also be passed to <code>render()<\/code>.<\/p>\n\n<pre><code>&lt;?php\n$pager = new Wp_Module_Pager();\n$pager-&gt;render( $custom_query, 'news', 'news' );\n<\/code><\/pre>\n\n<p>No pagination is rendered when the query has only one page.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Open Plugins &gt; Add New Plugin in the WordPress admin screen.<\/li>\n<li>Search for \"Module Pager\" and install it.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Review the default templates under Pagination Settings.<\/li>\n<li>Add the shortcode or PHP call where pagination should appear.<\/li>\n<\/ol>\n\n<p>To install a ZIP file, use Upload Plugin on the Add Plugins screen.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"why%20is%20the%20pagination%20not%20displayed%3F\"><h3>Why is the pagination not displayed?<\/h3><\/dt>\n<dd><p>Confirm that the target query contains enough posts to produce multiple pages.<\/p>\n\n<p>The plugin does not output pagination for a single-page query.<\/p><\/dd>\n<dt id=\"can%20the%20templates%20be%20restored%20to%20their%20defaults%3F\"><h3>Can the templates be restored to their defaults?<\/h3><\/dt>\n<dd><p>Select \"Reset to defaults\" on the Pagination Settings screen, and then save the settings.<\/p><\/dd>\n<dt id=\"can%20i%20use%20a%20custom%20wp_query%3F\"><h3>Can I use a custom WP_Query?<\/h3><\/dt>\n<dd><p>Pass the <code>WP_Query<\/code> object as the first argument of the PHP API's <code>render()<\/code> method.<\/p>\n\n<p>The shortcode uses the WordPress main query.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.7.0<\/h4>\n\n<ul>\n<li>Updated Mustache to version 3.<\/li>\n<li>Added test environments for WordPress 7.0 and PHP 8.5.<\/li>\n<li>Added automated tests for PHP 7.4 and PHP 8.5.<\/li>\n<li>Fixed the shortcode to return its rendered HTML correctly.<\/li>\n<li>Improved handling when the query string is unavailable or posts per page is zero.<\/li>\n<li>Fixed line break preservation and default restoration on the Pagination Settings screen.<\/li>\n<li>Registered default templates during plugin activation and added safe fallbacks for missing settings.<\/li>\n<li>Improved JavaScript escaping for templates displayed in the admin screen.<\/li>\n<li>Improved input validation and output escaping for Plugin Check compatibility.<\/li>\n<\/ul>","raw_excerpt":"Create customizable pagination by editing HTML templates in the WordPress admin screen.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/161312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=161312"}],"author":[{"embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/yamadev"}],"wp:attachment":[{"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=161312"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=161312"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=161312"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=161312"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=161312"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=161312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}