[WordPress] 外掛分享: AJAX Post Search and Filter

首頁外掛目錄 › AJAX Post Search and Filter
全新外掛
安裝啟用
★★★★★
5/5 分(1 則評價)
25 天前
最後更新
100%
問題解決
WordPress 5.6+ PHP 7.4+ v2.2 上架:2025-06-27

內容簡介

總結:AJAX Post Search and Filter 外掛允許使用者即時運用分類、標籤或自訂分類法詞彙,過濾文章內容。使用簡單的短碼在任何地方新增篩選器。

問題與答案:
1. 這個外掛提供什麼功能?
- 允許使用者即時運用分類、標籤或自訂分類法詞彙,過濾文章內容。

2. 如何在網站上添加過濾器?
- 使用簡單的短碼 [post_filter post="post" taxonomy="category, test" logic="saprate" load_type="button" per_page="3"] 可在任何地方添加篩選器。

3. 這個外掛的授權是什麼?
- 這個插件是自由軟體,根據 GPLv2 或更高版本授權釋出。

4. 在版本 1.1 中,有哪些功能改進?
- 加入了nonce驗證和使用者權限檢查以保護安全的AJAX請求。
- 改進了AJAX響應處理和錯誤回退在JavaScript中。
- 優化了分類查詢邏輯,支持“AND”/“OR” 過濾器。
- 改進了程式結構以提高維護性。

5. 版本 1.2 中進行了什麼變更?
- 完全淨化了所有AJAX輸入資料,以符合WordPress安全標準。
- 添加了缺少的版本參數到加載的CSS和JS中,以防止瀏覽器緩存問題。
- 重構輸入處理邏輯以通過PHPCS驗證。
- 小幅的程式改進以提升效能和可讀性。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.2) 或搜尋安裝

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

原文外掛簡介

AJAX Post Search and Filter lets you add powerful, fast post filtering to any page using a shortcode. No page reloads — everything loads instantly via AJAX.
Free Features:

3 Filter Types — Checkbox (multi-select), Radio (single-select), Select dropdown
Per-taxonomy filter type — each taxonomy can use a different filter type
Author filter (checkbox, radio, or select)
Date range filter with quick presets (Today, Yesterday, Last 7 days, Last Month, etc.)
Sort by — Newest, Oldest, Title A–Z, Title Z–A
Results count — “3 results out of 12”
Active filter chips with remove button
Collapsible filter groups
Reset All Filters button
Show More / Show Less for long term lists
1, 2 or 3 column grid layout
Load More button or Infinite Scroll
Post meta on card — author name and post date (customizable format)
Fallback image for posts without thumbnail
Exclude specific posts by ID
Include only specific posts by ID
RTL (right-to-left) layout support
Full style customization via admin panel
Custom CSS editor
Shortcode Generator with save/restore

Shortcode Example:
[ajaxpose_post_filter post=”post” taxonomy=”category” cols=”3″ filter_type=”radio”]
Filter type per taxonomy:
[ajaxpose_post_filter taxonomy=”category,post_tag” taxonomy_config='{“category”:”radio”,”post_tag”:”select”}’]
Shortcode Parameters

post (default: post)
Post type(s), comma-separated

taxonomy (default: category)
Taxonomy/ies, comma-separated

filter_type (default: checkbox)
checkbox, radio, or select

taxonomy_config
Per-taxonomy type override (JSON)

cols (default: 3)
1, 2 or 3 columns

per_page (default: 6)
Posts per page

load_type (default: button)
button or scroll

logic (default: separate)
separate (OR) or common (AND)

show_author_filter (default: 0)
1 = show author filter

show_date_filter (default: 0)
1 = show date range filter

show_sort (default: 1)
0 = hide sort dropdown

collapsible (default: 0)
1 = collapsible filter groups

show_thumbnail (default: 1)
0 = hide thumbnail

thumb_size (default: medium)
WP image size

fallback_image
URL for posts without thumbnail

show_author_meta (default: 0)
1 = show author on card

show_date_meta (default: 0)
1 = show date on card

date_format (default: d-m-Y)
PHP date format string

search_placeholder (default: Search...)
Search input placeholder

rtl (default: 0)
1 = right-to-left layout

exclude
Post IDs to exclude, e.g. 5,10,23

include
Show only these post IDs, e.g. 1,2,3

延伸相關外掛

文章
Filter
Apply Filters
Mastodon