Available since: 3.0
searchwp_stopwords_{$engine}
View Parameters »Note: Use of this hook will require a manual reindex
Note: Prior to version 3.0 this hook was tagged searchwp_common_words_{$engine}
SearchWP uses a set of stopwords to exclude from the index so as to increase the overall relevance of content within the index. You can use the searchwp_stopwords
hook to customize this list of stopwords for every search engine, but if you’d like to customize the stopwords for a single engine, add something like the following to your theme’s functions.php
:
<?php | |
function my_searchwp_stopwords_supplemental( $stopwords ) { | |
// don't remove any stopwords for the 'Supplemental' engine | |
return array(); | |
} | |
add_filter( 'searchwp_stopwords_supplemental', 'my_searchwp_stopwords_supplemental' ); |
Parameters
Parameter | Type | Description |
---|---|---|
$stopwords |
Array |
The stopwords to exclude from the index and from searching |