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