Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tell SearchWP to explicitly ignore posts both when indexing and searching
<?php
function my_searchwp_prevent_indexing() {
$post_ids = array( 15, 90 ); // EXCLUDE posts 15 and 90 from the index and searches
return $post_ids;
}
add_filter( 'searchwp_prevent_indexing', 'my_searchwp_prevent_indexing' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.