內容簡介
Module Pager 是一款可自訂分頁樣式的 WordPress 外掛,讓使用者能夠根據網站設計調整分頁顯示。透過簡單的設定,使用者可以輕鬆編輯分頁的 HTML 模板,並使用短碼或 PHP 模板渲染分頁。
【主要功能】
• 編輯分頁 HTML 模板
• 支援短碼渲染分頁
• 自訂前後連結
• 使用 Mustache 語法顯示頁碼
• 限制可儲存的 HTML 元素和屬性
外掛標籤
開發者團隊
原文外掛簡介
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.
render();
A custom WP_Query object, post type, and base path can also be passed to render().
render( $custom_query, 'news', 'news' );
No pagination is rendered when the query has only one page.
