SearchWP

This Documentation is for SearchWP Version 3

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:

<?php
add_filter( 'searchwp_index_attachments', '__return_false' );
view raw gistfile1.php hosted with ❤ by GitHub