Since: 4.0.0

Table of Contents

SearchWP uses Stopwords to both optimize the index and increase relevancy of search results.

The primary method of customizing the list of Stopwords is by way of the Settings tab of the SearchWP Settings screen. You can however programmatically filter Stopwords as well.


Type Parameter Default Since
String[] $stopwords Localized list of stopwords for your locale 4.0.0


All hooks should be added to your custom SearchWP Customizations Plugin.

Remove all Stopwords

// Remove all SearchWP Stopwords.
add_filter( 'searchwp\stopwords', '__return_empty_array' );

How to use this code