[WordPress] 外掛分享: Flexible Posts Widget

首頁外掛目錄 › Flexible Posts Widget
WordPress 外掛 Flexible Posts Widget 的封面圖片
8,000+
安裝啟用
★★★★
4.6/5 分(57 則評價)
3032 天前
最後更新
問題解決
WordPress 3.2+ v3.5.0 上架:2012-04-19

內容簡介

預設近期文章小工具非常簡單。我常常需要一個簡單的方法,能夠輕鬆地顯示任意文章類型或分類法的文章精選內容。這就是彈性文章小工具的由來。

彈性文章小工具 (FPW) 不僅只是預設近期文章小工具的簡單替代品。它擁有許多選項,高度可自訂化並允許高級使用者以基本無限的方式來顯示文章。

功能和選項

可自訂化的小工具標題
根據文章類型和/或分類法和/或該列表直接取得文章 ID 來獲得文章
控制所顯示文章的數量和偏移文章的數量
選擇文章內特色圖片的尺寸來顯示現有的圖片大小:縮略圖、中號、大號、內文特色圖片或由目前主題定義的任何大小
根據發布日期、修改日期、ID、標題、菜單順序、隨機、文章 ID 進行排序,並按昇冪或降序排列文章
可以透過使用者定義的模板自訂每個小工具的輸出內容。模板需置於目前主題資料夾內
多語言支援。可以兼容WPML和PolyLang。尚未與其他多語言外掛程式進行測試,但應該可以正常運作。

外掛程式勾子

彈性文章小工具目前有兩個公開勾子:

過濾器:dpe_fpw_args 在提交小工具文章查詢之前允許過濾查詢變量。
過濾器:dpe_fpw_template_{$template_name} 用於過濾顯示小工具輸出時使用的模板檔案路徑。

未來更新和功能請求清單

使用搜尋框取代 ID 文字欄來取得文章 ID
短碼功能。
依作者獲取文章。
過濾當前正在查看的文章。
從同一個儲存庫 (術語/文章類型等) 獲取文章。
限制某段時間內的結果。

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.5.0) 或搜尋安裝

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

原文外掛簡介

The default Recent Posts widget is exceptionally basic. I always find myself in need of a way to easily display a selection of posts from any combination post type or taxonomy. Hence, Flexible Posts Widget.
Flexible Posts Widget (FPW) is more than just a simple alternative to the default Recent Posts widget. With many per-instance options it is highly customizable and allows advanced users to display the resulting posts virtually any way imaginable.
Features & options

Customizable widget title
Get posts by post type(s) and/or taxonomy & term(s) or directly by a list of post IDs.
Control the number of posts displayed and the number of posts to offset.
Option to display the post feature image.
Select the post feature image size to display from existing image sizes: thumbnail, medium, large, post-thumbnail or any size defined by the current theme.
Order posts by: date, modified date, ID, title, menu order, random, Post ID Order; and sort posts: ascending or descending.
Each widget’s output can be customized by user-defined templates added to the current theme folder.
Multi Language support. Compatible with WPML and PolyLang for sure. Not tested with other multi-language plugins, but it should work.

Plugin Hooks
Flexible posts widget currently has two public hooks:

Filter: dpe_fpw_args allows filtering the query vars before submitting the widget posts query.
Filter: dpe_fpw_template_{$template_name} filters the template file path used to display the widget output.

Future updates & feature requests list

Use search box instead of ID text field for post id’s
Shortcode functionality.
Get posts by Author.
Filter out the post currently being viewed.
Get posts from the same archive (term/post type/etc).
Limit results by a time period.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon