Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created January 21, 2015 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/331fa4cd083940af3e2d to your computer and use it in GitHub Desktop.
Save jchristopher/331fa4cd083940af3e2d to your computer and use it in GitHub Desktop.
Tell SearchWP to index only Posts and nothing else
<?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