Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created March 26, 2020 17:52
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 jchristopher/5f8a9f912067ec0387e290434b8ab8fe to your computer and use it in GitHub Desktop.
Save jchristopher/5f8a9f912067ec0387e290434b8ab8fe to your computer and use it in GitHub Desktop.
Ignore additional meta keys in SearchWP
<?php
// Ignore additional meta keys in SearchWP.
add_filter(
'searchwp\source\post\attributes\meta\ignored',
function( $meta_keys, $args ) {
$meta_keys[] = 'my_not_useful_meta_key';
return $meta_keys;
},
20, 2
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment