Created
January 21, 2015 21:38
-
-
Save jchristopher/331fa4cd083940af3e2d to your computer and use it in GitHub Desktop.
Tell SearchWP to index only Posts and nothing else
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 | |
// reduce the size of the SearchWP index by only indexing Posts | |
// and ignoring all other post types completely | |
function my_searchwp_indexed_post_types( $post_types ) { | |
return array( 'post' ); | |
} | |
add_filter( 'searchwp_indexed_post_types', 'my_searchwp_indexed_post_types' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment