Available since: 1.0
searchwp_exclude_common
Note: Use of this hook will require a manual reindex
Control whether SearchWP excludes what it deems to be ‘common’ words.
Example: To include common words, add the following to your active theme’s functions.php
:
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 | |
add_filter( 'searchwp_exclude_common', '__return_false' ); |
This is a list of the words SearchWP considers common and excludes by default:
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 | |
$common = array( | |
"a", "about", "after", "ago", "all", "am", "an", "and", "any", "are", "aren't", "as", "at", "be", "but", "by", | |
"for", "from", "get", "go", "how", "if", "in", "into", "is", "isn't", "it", "its", "me", "more", "most", "must", | |
"my", "new", "news", "no", "none", "not", "nothing", "of", "off", "often", "old", "on", "once", "only", "or", | |
"other", "our", "ours", "out", "over", "page", "she", "should", "small", "so", "some", "than", "true", "thank", | |
"that", "the", "their", "theirs", "them", "then", "there", "these", "they", "this", "those", "thus", "time", | |
"times", "to", "too", "under", "until", "up", "upon", "use", "users", "version", "very", "via", "want", "was", | |
"way", "web", "were", "what", "when", "where", "which", "who", "whom", "whose", "why", "wide", "will", "with", | |
"within", "without", "would", "yes", "yet", "you", "your", "yours", | |
); |