[WordPress] 外掛分享: Custom Post Limits

WordPress 外掛 Custom Post Limits 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Custom Post Limits」是 2009-07-15 上架。 目前已經下架不再更新,不建議安裝使用。
  • 目前有 2000 個安裝啟用數。
  • 上一次更新是 2021-04-14,距離現在已有 1481 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.9 以上版本才可以安裝。
  • 有 6 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

coffee2code |

外掛標籤

limit | posts | query | listing | archives |

內容簡介

此外掛可獨立控制首頁、搜尋結果、作者、分類、標籤、自訂文章型別、自訂分類法和日期存檔的文章數量,包括特定的存檔。 WordPress 預設提供一個設定選項來控制部落格中各個區段的文章數量。 這個數值適用於首頁、作者列表、存檔列表、分類列表、標籤列表、自訂文章類型列表、自訂分類法列表和搜尋結果。 此外掛可讓您覆蓋每個部分的值。 此外掛可讓您針對以下部分定義限制:

• 作者存檔(任何作者的文章存檔)
• 作者存檔非第一頁(當瀏覽作者存檔清單時,不在第一頁時列出的文章數)
• 作者存檔(任何特定作者的文章存檔)
• 分類存檔(任何類別的文章存檔)
• 分類存檔非第一頁(當瀏覽分類存檔清單時,不在第一頁時列出的文章數)
• 特定自訂文章類型存檔(任何特定自訂文章類型的存檔列表)
• 自訂分類法存檔(任何特定自訂分類法的存檔列表)
• 日存檔(任何日的文章存檔)
• 日存檔非第一頁(當瀏覽日存檔清單時,不在第一頁時列出的文章數)
• 首頁(博客首頁上的文章列表)
• 首頁非第一頁(當瀏覽首頁清單時,不在第一頁時列出的文章數)
• 月存檔(任何月份的文章存檔)
• 月存檔非第一頁(當瀏覽月存檔清單時,不在第一頁時列出的文章數)
• 搜尋結果(搜尋結果列表)
• 搜尋結果非第一頁(當瀏覽搜尋結果列表時,不在第一頁時列出的文章數)
• 標籤存檔(任何標籤的文章存檔)
• 標籤存檔非第一頁(當瀏覽標籤存檔清單時,不在第一頁時列出的文章數)
• 獨立的標籤存檔(任何特定標籤的文章存檔)
• 年存檔(任何年份的文章存檔)
• 年存檔非第一頁(當瀏覽年存檔清單時,不在第一頁時列出的文章數)

如果某個部分的限制欄位為空或 0,則將套用預設文章限制。 如果值設為-1,則該部分將沒有限制(表示會顯示全部文章)。 存檔限制值也會被視為 day、month 和 year 存檔的預設限制,除非這些存檔是明確定義的。

連結: 外掛主頁 | WordPress 外掛頁面 | GitHub | 作者主頁

Hooks
此外掛公開了許多過濾器以進行掛鈎。 通常,使用過濾器的程式碼最好放在「mu-plugin」或「特定網站外掛」 中(這超出此自述文件的範圍)。

原文外掛簡介

Control the number of posts that appear on the front page, search results, and author, category, tag, custom post type, custom taxonomy, and date archives, independent of each other, including specific archives.
By default, WordPress provides a single configuration setting to control how many posts should be listed in each section of your blog. This value applies for the front page listing, author listings, archive listings, category listings, tag listings, custom post type listings, custom taxonomy listings, and search results. This plugin allows you to override that value for each of those different sections.
Specifically, this plugin allows you to define limits for:

Authors archives (the archive listing of posts for any author)
Authors archives non-first-page (when paging through authors archives listings, number of posts listed when not on the first page)
Author archives (the archive listing of posts for any specific author)
Categories archives (the archive listings of posts for any category)
Categories archives non-first-page (when paging through categories archives listings, number of posts listed when not on the first page)
Category archive (the archive listings of posts for any specific category)
Custom post type archives (the archive listings of posts for any specific custom post type)
Custom taxonomy (the archive listings of posts for any specific custom taxonomy)
Day archives (the archive listings of posts for any day)
Day archives non-first-page (when paging through day archives listings, number of posts listed when not on the first page)
Front page (the listing of posts on the front page of the blog)
Front page non-first-page (when paging through front page listings, number of posts listed when not on the first page)
Month archives (the archive listings of posts for any month)
Month archives non-first-page (when paging through month archives listings, number of posts listed when not on the first page)
Search results (the listing of search results)
Search results non-first-page (when paging through search results listings, number of posts listed when not on the first page)
Tags archives (the archive listings of posts for any tag)
Tags archives non-first-page (when paging through tags archives listings, number of posts listed when not on the first page)
Tag archive (the archive listings of posts for any specific tag)
Year archives (the archive listings of posts for any year)
Year archives non-first-page (when paging through year archives listings, number of posts listed when not on the first page)

If the limit field is empty or 0 for a particular section type, then the default post limit will apply. If the value is set to -1, then there will be NO limit for that section (meaning ALL posts will be shown). The Archives Limit value is also treated as the default limit for Day, Month, and Year archives, unless those are explicitly defined.
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
Hooks
The plugin exposes a number of filters for hooking. Typically, code making use of filters should ideally be put into a mu-plugin or site-specific plugin (which is beyond the scope of this readme to explain).
c2c_cpl_enable_all_individual_limits (filter)
The ‘c2c_cpl_enable_all_individual_limits’ hook allows you to filter if individual limits are enabled for all archive types.
The ability to set individual limits (e.g. for per-author or per-category archives) isn’t simply enabled by default because it can have a negative performance impact depending on the number of items. Especially for a something most sites are unlikely to need.
Arguments:

$enabled (boolean): Enable individual limits for all archive types? Default false.

Example:
// Enable individual limits for all archives for Custom Post Limits plugin.
add_filter( 'c2c_cpl_enable_all_individual_limits', '__return_true' );

c2c_cpl_enable_all_individual_{$type}_limits (filter)
The ‘c2c_cpl_enable_all_individual_{$type}_limits’ hook allows you to filter if individual limits are enabled for a specific archive type. The dynamic portion of the hook name, $type, refers to the type of archive with constituent individual archives. Can be ‘authors’, ‘categories’, or ‘tags’.
Arguments:

$enabled (boolean): Enable individual limits for given archive type? Default false.

Example:
// Enable individual limits for author archives for Custom Post Limits plugin.
add_filter( 'c2c_cpl_enable_all_individual_authors_limits', '__return_true' );

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Custom Post Limits」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.5 | 2.0 | 2.5 | 2.6 | 3.5 | 3.6 | 4.1 | 4.2 | 4.3 | 4.4 | 4.0.2 | 4.2.1 | 4.2.2 | 4.4.1 | trunk |

延伸相關外掛(你可能也想知道)

  • GD bbPress Attachments 》GD bbPress Attachments是一款易於使用的WordPress和bbPress插件,可用於實現bbPress論壇主題和回復的文件上傳。您可以從主插件設置面板控制文件大小,或者您...。
  • Woo Title Limit 》這款 WordPress 外掛可以讓使用者在 WooCommerce 的商店、分類、標籤、產品頁面和首頁中,設定產品標題的最大長度。, 透過此外掛,可以避免過長的產品標題造...。
  • User Posts Limit 》這款外掛能夠限制使用者在任何文章類型上能夠建立的文章數量。, 文件 | 聯絡我們, 如何使用, , 外掛設定: 選擇使用者角色、文章類型、限制條件以及週期。, , ...。
  • Limit Revisions 》「Limit Revisions」是一個小型外掛程式,可以讓您選擇 WordPress 儲存在資料庫中的修訂版本數量上限。您可以在「設定 > 一般設定」的底部選擇上限數量,如果...。
  • Limit Post Titles 》這個 WordPress 外掛可以在 WordPress 後台內設定文章標題的字元限制。這個外掛支援預設的文章與頁面 (posts/pages),也可與任何由外掛或佈景主題定義的自訂...。
  • Frontpage Manager 》Frontpage Manager 是一個外掛,讓你可以以多種不同方式自訂首頁上貼文的顯示方式。, , 你可以從所有類別或自選子類別中選擇貼文, 你可以自選首頁顯示的貼文...。
  • Increase upload file size & Maximum Execution Time limit 》[ ✅ 由 Puvox 提供的安全插件 ] :, , • 為了安全起見,已進行修改以確保無漏洞。, • 高效,不會增加網站的負載或讓網站變慢。, • 不會收集私人數據。, ,...。
  • HTTP Requests Manager 》總結:這個 WordPress 外掛可以防止 WP HTTP 請求拖慢你的網站和管理介面的速度。它可以設定每個請求的超時時間、限制每個頁面請求的數量、當頁面載入時間超...。
  • Whitelist IP For Limit Login Attempts 》支援, , 請至我們的網站: http://club.orbisius.com/ 尋求支援。, 請勿使用 WordPress 論壇或其他地方尋求支援。, , 這個外掛允許您將IP地址加入白名單,讓 ...。
  • WordPress Word Count and Limit 》這個外掛可以在編輯文章視窗的底部即時將字數資訊替換為字元/單字計算。此外,您可以將字元/單字計算限制在指定的使用者角色中。, 這裡列出了設定清單(詳細...。
  • Search Limiter & Blocker 》此外掛可讓您透過 IP 地址為訪客設定搜尋限制。此外掛會自動偵測訪客的 IP 地址,並紀錄這些 IP 地址的每個搜尋行為。您可設定這些 IP 地址的限制和封鎖時間。。
  • Limit Max IPs Per User 》限制用戶可以登錄的最大IP數。, 功能:, * 設置最大IP數和天數。, * 查看用戶的登錄日誌,以及他們的登錄是否被阻止。, * 通過 編輯用戶 頁面重置特定用戶的I...。
  • Limit Image Size 》大多數使用者喜歡直接從數位相機上傳他們的新照片至 WordPress,但是接下來會發生什麼?硬碟空間不足、頻寬不足,並因為大型圖片而拖慢網站速度。, 限制圖片...。
  • Gateways MinMax for WooCommerce 》一些網店管理員想要根據訂單總金額停用一個或多個付款方式,這個外掛就是他們需要的。例如,您可能希望在訂單小於100美元時停用「貨到付款」,或者您可能希望...。
  • Limit Widgets 》這是一個簡單的 WordPress 外掛程式,允許網站管理員限制小側邊欄中的小工具數量。您只需前往"設置"->"限制小工具"頁面,並自定義每個菜單使用的小工具的最大...。

文章
Filter
Apply Filters
Mastodon