Created
October 28, 2014 11:46
-
-
Save jchristopher/093151a7047fd1fb9fb0 to your computer and use it in GitHub Desktop.
Use searchwp_query_results to modify the results returned by SearchWP
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 | |
function my_searchwp_query_results( $post_ids, $args ) { | |
// $post_ids is an array of post IDs returned by the search, you can | |
// manipulate it by adding/removing your own IDs | |
return $post_ids; | |
} | |
add_filter( 'searchwp_query_results', 'my_searchwp_query_results', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment