Available since: 1.1
searchwp_index_attachments
Indexing Media is a resource-intensive task. If you don’t plan to utilize Media in your search engine settings, using this filter to tell SearchWP to completely ignore Media will decrease the time it takes to build the index and reduce weight of the index overall.
Example: Use tell SearchWP to completely disregard Media during indexing and searching, add the following to your active 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 | |
add_filter( 'searchwp_index_attachments', '__return_false' ); |