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:6.0
WordPress version tested:7.1.5
Plugin version:1.1.1
Added to WordPress repository:28-05-2021
Last updated:19-11-2026
Rating, %:0
Rated by:0
Plugin URI:
Total downloads:3 668
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 one_search_result_redirect_code, defaults to 302.


ChangeLog