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: 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:

<?php
add_filter( 'searchwp_exclude_common', '__return_false' );
view raw gistfile1.php hosted with ❤ by GitHub

This is a list of the words SearchWP considers common and excludes by default:

<?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",
);
view raw gistfile1.php hosted with ❤ by GitHub
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