Title: Query2Slug
Author: bufox
Published: <strong>2026 年 5 月 11 日</strong>
Last modified: 2026 年 5 月 11 日

---

搜索插件

![](https://ps.w.org/query2slug/assets/banner-772x250.png?rev=3528764)

![](https://ps.w.org/query2slug/assets/icon-256x256.png?rev=3528764)

# Query2Slug

 作者：[bufox](https://profiles.wordpress.org/simonemorobufox/)

[下载](https://downloads.wordpress.org/plugin/query2slug.1.0.0.zip)

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

 [支持](https://wordpress.org/support/plugin/query2slug/)

## 描述

Query2Slug lets you turn filtered WordPress pages into clean, canonical URLs — perfect
for ad campaigns (Google Ads, Meta), SEO landing pages, and shareable links.

Instead of sending users to ugly URLs like:

    ```
    /shop/?product_cat=t-shirt&product_tag=disney
    ```

You create a clean slug that resolves to the same filtered view:

    ```
    /lp/t-shirt-disney/
    ```

**No pages to create. No content to duplicate. Just a simple mapping.**

#### How it works

 1. Set a URL prefix (default: `lp`)
 2. Create rules that map a slug to a set of query parameters
 3. The plugin registers rewrite rules and handles canonical redirects automatically

#### Key features

 * **Clean campaign URLs** — create pretty URLs for any combination of query parameters
 * **Canonical redirect** — visitors arriving via query strings are automatically
   redirected (301) to the clean URL
 * **UTM preservation** — tracking parameters (utm_source, fbclid, gclid, etc.) 
   are preserved through redirects
 * **WooCommerce-friendly** — works with product categories, tags, and attributes
   out of the box
 * **Works everywhere** — not limited to WooCommerce; supports any WordPress taxonomy
   or query var
 * **Autocomplete** — filter editor suggests registered taxonomies and their terms
 * **Zero frontend impact** — no CSS or JavaScript added to your site’s frontend

#### Use cases

 * Google Ads / Meta campaign landing pages
 * SEO-friendly filtered archive pages
 * Clean shareable links for filtered product collections
 * Any scenario where you need a pretty URL for a query string

## 屏幕截图

[⌊Rules list with status toggle, URL preview, and filter summary⌉⌊Rules list with
status toggle, URL preview, and filter summary⌉[

Rules list with status toggle, URL preview, and filter summary

[⌊Rule editor with slug preview and filter autocomplete⌉⌊Rule editor with slug preview
and filter autocomplete⌉[

Rule editor with slug preview and filter autocomplete

[⌊Settings page with URL prefix configuration and overview widget⌉⌊Settings page
with URL prefix configuration and overview widget⌉[

Settings page with URL prefix configuration and overview widget

## 安装

 1. Upload the `query2slug` folder to `/wp-content/plugins/`
 2. Activate the plugin through the WordPress admin
 3. Go to **Query2Slug > Settings** to configure your URL prefix
 4. Go to **Query2Slug > Add Rule** to create your first mapping

## 常见问题

### Does this plugin require WooCommerce?

No. Query2Slug works with any WordPress site. WooCommerce taxonomies and attributes
will appear in the autocomplete when WooCommerce is active, but the plugin functions
independently.

### What happens if I deactivate the plugin?

All your rules are preserved in the database. The clean URLs will simply stop working(
return 404) until you reactivate. No content is lost.

### Can I use this with custom taxonomies?

Yes. Any registered public taxonomy will appear in the filter key autocomplete.

### How does the canonical redirect work?

If a visitor arrives at a URL with query parameters that exactly match a rule (e.
g., `?product_cat=t-shirt&product_tag=disney`), the plugin issues a 301 redirect
to the clean URL. UTM and tracking parameters are preserved.

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

 *   [ bufox ](https://profiles.wordpress.org/simonemorobufox/)

[帮助将「Query2Slug」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/query2slug)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0.0

 * Initial release

## 额外信息

 *  版本 **1.0.0**
 *  最后更新：**4 周前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 6.0 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  PHP 版本 ** 8.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/query2slug/)
 * 标签
 * [campaign](https://cn.wordpress.org/plugins/tags/campaign/)[landing page](https://cn.wordpress.org/plugins/tags/landing-page/)
   [slug](https://cn.wordpress.org/plugins/tags/slug/)[url](https://cn.wordpress.org/plugins/tags/url/)
   [woocommerce](https://cn.wordpress.org/plugins/tags/woocommerce/)
 *  [高级视图](https://cn.wordpress.org/plugins/query2slug/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/query2slug/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/query2slug/reviews/)

## 贡献者

 *   [ bufox ](https://profiles.wordpress.org/simonemorobufox/)

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/query2slug/)