Note: You are viewing the documentation for Version 3View Version 4 Docs

Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 2.6.2

searchwp_locale_override

View Parameters »

SearchWP’s keyword stemming feature requires that the site locale be supported. The searchwp_locale_override hook allows you to override this behavior.

You can override your site’s locale by adding something like this to your theme’s functions.php:

<?php
// Override locale as far as SearchWP is concerned
add_filter( 'searchwp_locale_override', function( $locale ) {
return 'en_US';
});
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$locale String

The actual site locale

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP