Created
March 19, 2020 19:56
-
-
Save tott/ee8e43ded24e8547c32dd80db5484445 to your computer and use it in GitHub Desktop.
Hide repeater styrle fields following the pattern ..._0_... from indexing in ElasticPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'ep_prepare_meta_data', function( $meta ) { | |
foreach( $meta as $key => $value ) { | |
if ( preg_match( '/.+_([0-9]+)_.+/', $key ) ) { | |
unset( $meta[$key] ); | |
} | |
} | |
return $meta; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment