📜  elasticpress acf - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:27.451000             🧑  作者: Mango

代码示例2
/**
  * ElasticSearch: Modify available search fields
  */
  add_filter( 'ep_search_fields', function($search_fields, $args ) {
    $fields = ['my_field'];
    foreach($acf_fields as $key => $label) {
    $fields[] = 'meta.'.$key.'.value';
  }
  return array_merge( $search_fields, $fields );
 }, 10,2 );