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

searchwp_auto_reindex

SearchWP automatically triggers an index update when content is edited. If you would like to prevent that from happening you can use this filter.

The difference between this hook and searchwp_background_deltas is that this hook simply prevents the reindexing of posts, they are still purged from the index. When using searchwp_background_deltas posts are not purged nor reindexed.

Example: To prevent SearchWP from automatically reindexing edited posts, add the following to your active theme’s functions.php:

<?php
// prevent SearchWP from automatically maintaining it's index
add_filter( 'searchwp_auto_reindex', '__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