Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Always ignore Post 732 and Page 98 in SearchWP
<?php
// Always ignore Post 732 and Page 98 in SearchWP.
add_filter(
'searchwp\post__not_in',
function( $ids ) {
return array_merge( $ids, [ 732, 98 ] );
},
20, 2
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment