您可以以类似的方式在前端使用ACF
$user_id = \'user_\' . $user->ID . \'\';
$field = get_field( \'some_field\', $user_id );
请注意,必须设置某些设置
然后可以使用AJAX从前端更新必要的字段
$post_id = $_POST[\'post_id\'];
$some_post_data = $_POST[\'some_post_data\'];
$field_ref = get_field_reference(\'some_field\', $post_id);
$field = get_field(\'some_field\', $post_id);
$value = $field;
var_dump($value);
//$value modification
update_field($field_ref, $value, $post_id);