One Search Result

plugin banner

Automatically send a user to the page or post if it's the only search result available.

Author:Brad Parbs (profile at wordpress.org)
WordPress version required:5.2
WordPress version tested:5.8
Plugin version:1.1.0
Added to WordPress repository:28-05-2021
Last updated:20-08-2021
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:
Total downloads:1 879
plugin download
Click to start download

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 once_search_result_redirect_code, defaults to 302.


ChangeLog