Hide repeater styrle fields following the pattern ..._0_... from indexing in ElasticPress
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