SearchWP

Native Search

By default SearchWP will intercept native WordPress search requests and override native search results with its own.

Search forms and results templates

When it comes to native WordPress search integration with SearchWP, there’s nothing to do! WordPress’ default search forms provided by get_search_form() (which you’re probably already using) are already set up to trigger a native WordPress search, which SearchWP intercepts.

If your search form has been customized, you can remove those customizations which will restore the form to making a GET request to the site_url() with a single query parameter s which is precisely what triggers a native WordPress search.

In the same way, you also do not need to customize your existing search results template! SearchWP does not intercept the display of search results for native WordPress searches, it only provides a new results set for the theme to display.

That said, SearchWP does not facilitate search results display customization as that is the responsibility of the theme. If you are looking to improve your native WordPress search results in such a way that SearchWP provides but is not compatible with WordPress (e.g. including Users or another unsupported Source into your search results) you will need to use a Supplemental Engine.

This outcome not a shortcoming of SearchWP or WordPress for that matter, but instead a recognition that WordPress core (and any related code, hooks, etc) assumes native search results are WP_Post objects. No problem! This is why we have Supplemental Engines. ?

Extra URL query parameters

SearchWP does not listen for all URL query parameters that may work with native WordPress searches. SearchWP expects a plain, boring URL similar to https://example.com/?s=coffee+mug – with no extra bells and or whistles, just the ?s query parameter that triggers a native WordPress search.

If your implementation does want to support URL query parameters, there’s a Hook for that!

Is it working?

The best way to determine whether the results you’re seeing are provided by SearchWP would be to first enable Debugging. Once enabled, SearchWP will output an HTML comment block on your search results pages. This comment block includes details about the search(es) run and the results found for each.

If the results you’re seeing don’t match what SearchWP found, it means that SearchWP’s results were overridden by some other code. Not an issue! You can open a support ticket and we’ll help you find the culprit.