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.8.4


View Parameters »

By default SearchWP indexes only comment content when comments have been added to a search engine configuration.

Related: searchwp_include_comment_author and searchwp_include_comment_email

You can use this hook to modify the entire comment object that SearchWP analyzes when indexing:

add_filter( 'searchwp_indexer_comment', function( $comment ) {
// TODO: manipulate the $comment object in any way you see fit
// @link
return $comment;
} );
view raw functions.php hosted with ❤ by GitHub


Parameter Type Description
$comment Object

The comment being indexed

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