Limit the SearchWP results to three specific posts
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_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