Support

Account

Home Forums Front-end Issues update_field() for comment fields Reply To: update_field() for comment fields

  • Hi @zanetaylor
    I also needed to update the custom fields associated with a comment and I discovered that the function update_field () can be used, as in other cases. In the case of comments, however, it is necessary to pass the object and not the ID, as in this example.

    
    <?php
    
    update_field( 'field_5a46bb8740511', $value, get_comment($comment_id) ); 
    
    ?>