內容簡介
將您的 WordPress 文章分類轉化為搜索強大器!此外掛讓您能夠提供使用者一個控制選單,裡面有基於父分類和子分類的下拉選項。
釋出版本 2.2 後,新增了一個功能 —— 現在您可以設置 AJAX 鏈接式選擇框。例如,如果您有多個國家,每個國家有多個州,您可以請使用者先選擇一個國家。
當選擇國家時,此外掛會自動查找該國家下的任何州,然後在國家下拉選项下方顯示該國家的州選項。
多個子分類跨越多個父分類(但是一個父分類內的多個子分類不能被選擇),智能篩選您的文章。
請注意,此外掛雖然是一個小工具,但是您可以在主題中的任何位置定義側邊欄并使用它。請將其視為「區塊」而不是「側邊欄」。
應用示例:
房地產 —— 設置父分類,例如“臥室”、“浴室”、“價格範圍”等。然後在其下放置子分類。這些是可以被搜索的項目。
創建一個新文章,標記您想要的所有子分類。現在,使用者可以在所有這些分類下搜索到您的文章了!
功能:
包含式分類搜索
排除式分類搜索
搜索結果排序
自動檢查“未分類”分類並隱藏它
生成完整的 URL
如果啟用了永久鏈接,現在會執行正確的 URL 重寫
分頁
如果按下搜索,可以決定是顯示所有文章(或文章分類 ID),還是顯示空白頁面
排除某些分類
通過 All-in-one-SEO、WP Smart Sort 和 sCategory Permalink 進行了測試。現在相容性更好了!由於需要重新編寫邏輯,因此升級到了 2.0 版本
支援新的 WP 2.8+ 小工具類結構,因此現在可以根據需要使用多個小工具
2 級 AJAX 鏈接選項
請注意,我只會在需要或得到報酬時更新這個外掛。歡迎共同參與改進!
外掛標籤
開發者團隊
② 後台搜尋「Multiple Category Selection Widget」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
Turn your WordPress post categories into a search powerhouse! This plugin gives you a set of dropdown menus based on parent categories and their sub-categories. Users select one sub-category per parent, and the plugin filters posts matching the selected combination.
Available as:
Gutenberg Block — “Multi-Category Filter” in the block inserter (new in v4)
Classic Widget — “Multi-Category Selection” in Appearance > Widgets
Shortcode — [mcsw] on any page or post
Features:
AND / OR category filtering — find posts matching ALL or ANY selected categories
AJAX chained drilldown — selecting a parent dynamically loads its children
Pretty permalink URLs (/categories/3,5/search_type/and/order/title/)
Ordering by title or default
Configurable blank search behavior
Exclude specific categories
Lightweight — no jQuery, no external dependencies
Pagination support
Display form above results on category pages (optional)
Sample use case:
Real estate — set up parent categories like “Bedrooms”, “Bathrooms”, “Price Range” with sub-categories beneath them. Users filter listings by selecting from each dropdown.
Upgrading from v3.x:
PHP sessions have been removed entirely — the URL now carries all state, which means better compatibility with caching plugins, load balancers, and modern hosting
jQuery has been replaced with vanilla JavaScript
CSS classes have changed from wpmcsw/wpmm to BEM-style mcsw-* classes — update any custom CSS
The old select-chain.js in the plugin root has been replaced by js/select-chain.js
