Available since: 2.5
searchwp_indexer_pre_process_content
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:
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 | |
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' ); |
Parameters
Parameter | Type | Description |
---|---|---|
$content |
String |
The source content |