
One Search Result
v1.1.1Brad Parbs · 2021年5月28日 上架
Automatically send a user to the page or post if it's the only search result available.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 3,657
- 最近更新
- 2026年11月20日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+
贡献者
When there is only one search result available for a query, automatically redirect the user to that result.
This will work with any theme and any posts, pages, or custom post types that would be shown in search results.
Available Filters
You can filter one_search_result_pre_check to false if you need to short-circuit and disable the redirect dynamically.
You can modify the redirect code with one_search_result_redirect_code, defaults to 302.