Skip to content
Sign in

One Search Result

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

Not scanned yet WordPress plugin

Install in

No install steps yet

Follow the steps on the source page.

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.

Written by Joobi from the project's own listing. See the source page

contentredirectsresultssearch
19 Nov 2026
Version 1.1.1 released. Not scanned yet.

1.1.1

  • Only redirects when the search has exactly one result in total, not when the last page of results has one.
  • Added the one_search_result_redirect_code filter. The misspelled once_search_result_redirect_code filter still works.
  • Requires WordPress 6.0 and PHP 7.4, tested up to WordPress 7.1.

1.1.0

  • Added another filter, cleaned up code.

1.0.3

  • Initial release
28 May 2021Listed on Joobi from WordPress.org.

Follow this listing's changes (Atom feed)