Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created April 22, 2019 17: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 jchristopher/b088b4ba407670aa4e0a9e81fb203ffe to your computer and use it in GitHub Desktop.
Save jchristopher/b088b4ba407670aa4e0a9e81fb203ffe to your computer and use it in GitHub Desktop.
Tell SearchWP to remove Advanced Custom Fields (ACF) field references when indexing
<?php
// NOTE: See https://searchwp.com/docs/hooks/searchwp_acf_remove_field_references/
add_filter( 'searchwp_acf_remove_field_references', function( $remove, $context ) {
// TODO: Determine whether ACF field references should be removed.
return $remove; // true/false
}, 20, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment