Category Filter Block

外掛說明

The category filter block allows you to filter posts displayed with the standard Query Loop block by category, without a page refresh. The Interactivity API is fully supported.

Features

✅ The category filter can be displayed as links or as a select dropdown field
✅ You can display a post count number near each category
✅ Custom All Categories text
✅ Works without page refresh (AJAX + Interactivity API)
✅ Sticky positioning
✅ Block styles customization (Font size, Padding, Margin)
✅ The block can add parameters to the page URL, for example, ?filter-category=travel

The plugin also has a PRO version, its main difference is that it supports filtering by any custom taxonomy – Tags, Product Categories, Product Tags, Brands, etc. It has a bunch of other features too.

Pro features

⚡️ Custom taxonomies are supported
⚡️ Multiple taxonomy filters within the same Query Loop block (for example, by categories AND tags)
⚡️ Sort categories (terms) in the filter alphabetically, by post count, or in a custom order
⚡️ The filter can be displayed as buttons with the possibility of style customization (Text color, Background color, Border, Border radius, etc.)
⚡️ Display checkboxes in the dropdown filter to select multiple categories

🚀 Upgrade to Pro

螢幕擷圖

適用於區塊編輯器

這個外掛提供 1 個可供區塊編輯器使用的區塊。

  • Category Filter Displays a simple AJAX-powered category filter.

安裝方式

Automatic Install

  1. Log into your WordPress dashboard and go to Plugins → Add New
  2. Search for “Category Filter Block”
  3. Click “Install Now” under the “Category Filter Block” plugin
  4. Click “Activate Now”

Manual Install

  1. Download the plugin from the download button on this page
  2. Unzip the file, and upload the resulting category-filter-block folder to your /wp-content/plugins directory
  3. Log into your WordPress dashboard and go to Plugins
  4. Click “Activate” under the “Category Filter Block” plugin

常見問題集

Is there a demo?

Yes, you can see every filter type in action on the demo page.

Are custom post types supported?

Yes, both free and PRO versions allow you to filter custom post types by category. However, if you need to filter CPT by tags or a custom taxonomy, then you will need the PRO version of the plugin.

Is it tested with the latest PHP version?

Yes, it is.

Will it work if the “Reload full page” option is active for my “Query Loop” block?

Yes, the plugin supports both AJAX and non-AJAX query loops.

使用者評論

2025 年 4 月 7 日
Tried the plugin and really enjoyed it. It doesn’t overload the interface with shiny icons or notifications with suggestions to upgrade to a pro version. Plus, it works as it should.
閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Category Filter Block〉的開發相關工作。

參與者

將〈Category Filter Block〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.2.1

  • Minor UI improvements

1.2

  • Fixed: An issue with the link-type filter styles in the Block Editor in WordPress 7.0

1.1

  • Fixed: Deprecation notices in the browser console (Block API version, __nextHasNoMarginBottom, and __next40pxDefaultSize)
  • Minor UI improvements

1.0

  • Initial release