Linux 软件免费装

Dynamic Category Slug Filter

开发者 thuynh91
更新时间 2025年7月12日 18:22
PHP版本: 7.0 及以上
WordPress版本: 6.8
版权: GPLv2 or later
版权网址: 版权信息

标签

multilingual JavaScript category filter REST API dynamic 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:

安装:

  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.

升级注意事项:

1.0 Initial version.

常见问题:

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.

更新日志:

1.0