ID, '_wp_page_template', true ) ) { return $doc; } $plugin_s4wp_settings = solr_options(); $index_custom_fields = apply_filters( 'solr_index_custom_fields', $plugin_s4wp_settings['s4wp_index_custom_fields'] ); $post_content = ''; foreach ( $index_custom_fields as $meta_key ) { $post_content .= get_post_meta( $post->ID, $meta_key, true ) . PHP_EOL . PHP_EOL; } $doc->setField( 'post_content', strip_tags( $post_content ) ); return $doc; }, 10, 2 );