Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created December 8, 2013 19:41
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/7862877 to your computer and use it in GitHub Desktop.
Save jchristopher/7862877 to your computer and use it in GitHub Desktop.
Limit the SearchWP results to three specific posts
<?php
function my_searchwp_include_three_posts( $ids, $engine, $terms ) {
// make sure searches are limited to posts 134, 188, and 189
return array( 134, 188, 189 );
}
add_filter( 'searchwp_include', 'my_searchwp_include_three_posts', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment