searchwp\stopwords
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.
Parameters
Type | Parameter | Default | Since |
---|---|---|---|
String[] | $stopwords |
Localized list of stopwords for your locale | 4.0.0 |
Examples
All hooks should be added to your custom SearchWP Customizations Plugin.
Remove all Stopwords
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove all SearchWP Stopwords. | |
add_filter( 'searchwp\stopwords', '__return_empty_array' ); |