[WordPress] 外掛分享: Module Pager

首頁外掛目錄 › Module Pager
20+
安裝啟用
尚無評分
2 天前
最後更新
問題解決
WordPress 5.8+ PHP 7.2+ v1.7.0 上架:2022-09-01

內容簡介

Module Pager 是一款可自訂分頁樣式的 WordPress 外掛,讓使用者能夠根據網站設計調整分頁顯示。透過簡單的設定,使用者可以輕鬆編輯分頁的 HTML 模板,並使用短碼或 PHP 模板渲染分頁。

【主要功能】
• 編輯分頁 HTML 模板
• 支援短碼渲染分頁
• 自訂前後連結
• 使用 Mustache 語法顯示頁碼
• 限制可儲存的 HTML 元素和屬性

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.7.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Module Pager」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon