Skip to content

Instantly share code, notes, and snippets.

@searchwpgists
Created March 29, 2022 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save searchwpgists/bd5fd456353db9ce097c9d42243b0a96 to your computer and use it in GitHub Desktop.
Save searchwpgists/bd5fd456353db9ce097c9d42243b0a96 to your computer and use it in GitHub Desktop.
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