Note: You are viewing the documentation for Version 3View Version 4 Docs


View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 2.5


View Parameters »

Using this hook you can pre-process post content before it’s sent to the indexer. This can help you remove some edge cases in your content that may prevent accurate search results. To implement your own pre-processing of content before it’s sent to SearchWP’s indexer, add something like the following to your theme’s functions.php:

function my_searchwp_indexer_pre_process_content( $content ) {
// TODO: manipulate $content in any way you want
return $content;
add_filter( 'searchwp_indexer_pre_process_content', 'my_searchwp_indexer_pre_process_content' );
view raw gistfile1.php hosted with ❤ by GitHub


Parameter Type Description
$content String

The source content

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