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


View Parameters »

Note: Use of this hook will require a manual reindex

By default SearchWP does not include comment authors when indexing (and as a result when searching) but if you would like to have the comment author included when indexing each comment for a post you can use this hook by adding the following to your theme’s functions.php:

add_filter( 'searchwp_include_comment_author', '__return_true' );
view raw gistfile1.php hosted with ❤ by GitHub


Parameter Type Description
$include_comment_author Boolean

Whether the comment author should be 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