Title: Dynamic Category Slug Filter
Author: Tony Huynh
Published: <strong>2025 年 7 月 12 日</strong>
Last modified: 2025 年 7 月 12 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/dynamic-category-slug-filter.svg)

# Dynamic Category Slug Filter

 作者：[Tony Huynh](https://profiles.wordpress.org/thuynh91/)

[下载](https://downloads.wordpress.org/plugin/dynamic-category-slug-filter.zip)

 * [详情](https://cn.wordpress.org/plugins/dynamic-category-slug-filter/#description)
 * [评价](https://cn.wordpress.org/plugins/dynamic-category-slug-filter/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/dynamic-category-slug-filter/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/dynamic-category-slug-filter/#developers)

 [支持](https://wordpress.org/support/plugin/dynamic-category-slug-filter/)

## 描述

This plugin dynamically generates category filter buttons using slugs declared in
your HTML (e.g., in a Grid block). It fetches category names using the WordPress
REST API, eliminating manual slug-to-name mapping.

Features include:

 * Auto filter display from data-cat-slug attribute
 * Smart category name resolution via REST API
 * Works with Betheme’s .btCatFilter structure
 * No PHP or theme file edits needed
 * Supports multilingual category names

### License

This plugin is licensed under GPLv2 or later.

## 安装

 1. Upload the ZIP file via WordPress Admin  Plugins  Add New  Upload Plugin.
 2. Activate the plugin.
 3. Edit your page or post with a Grid or blog section.
 4. Add the attribute `data-cat-slug="slug1,slug2"` to the element.
 5. Ensure filter container uses `.btCatFilter` and items use `.btCatFilterItem`.

## 常见问题

### Does it require jQuery?

No. It uses vanilla JavaScript.

### Does it support multilingual websites?

Yes. It works with category names in any language.

### Can I use it with custom taxonomies?

Yes, with minor tweaks to REST API endpoint logic.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Dynamic Category Slug Filter」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Tony Huynh ](https://profiles.wordpress.org/thuynh91/)

[帮助将「Dynamic Category Slug Filter」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/dynamic-category-slug-filter)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/dynamic-category-slug-filter/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/dynamic-category-slug-filter/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/dynamic-category-slug-filter/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/dynamic-category-slug-filter/)。

## 更新日志

#### 1.0

 * Initial release.

## 额外信息

 *  版本 **1.0**
 *  最后更新：**1 年前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **6.8.11**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/dynamic-category-slug-filter/)
 * 标签
 * [category filter](https://cn.wordpress.org/plugins/tags/category-filter/)[dynamic filter](https://cn.wordpress.org/plugins/tags/dynamic-filter/)
   [javascript](https://cn.wordpress.org/plugins/tags/javascript/)[multilingual](https://cn.wordpress.org/plugins/tags/multilingual/)
   [rest-api](https://cn.wordpress.org/plugins/tags/rest-api/)
 *  [高级视图](https://cn.wordpress.org/plugins/dynamic-category-slug-filter/advanced/)

## 评级

尚未提交反馈。

[您的评价](https://wordpress.org/support/plugin/dynamic-category-slug-filter/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/dynamic-category-slug-filter/reviews/)

## 贡献者

 *   [ Tony Huynh ](https://profiles.wordpress.org/thuynh91/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/dynamic-category-slug-filter/)