Created
December 8, 2013 19:22
-
-
Save jchristopher/7862575 to your computer and use it in GitHub Desktop.
Control whether SearchWP searches return an array of WordPress Post objects, or simply an array of their IDs
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_maybe_searchwp_load_posts( $loadPosts, $args ) { | |
// print_r( $args ); // uncomment this line to see the engine arguments | |
return false; // return only post IDs | |
} | |
add_filter( 'searchwp_load_posts', 'my_maybe_searchwp_load_posts', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment