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

searchwp_index_comments

Note: Use of this hook will require a manual reindex

By default SearchWP will include Comments in the index. If you do not want Comment content to be indexed at all, you can add the following to your theme’s functions.php:

<?php
add_filter( 'searchwp_index_comments', '__return_false' );
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