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: 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' );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$stopwords Array

The stopwords to exclude from the index and from searching

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