ACF get_fields() not working but get_field() does

This is confusing: calls to get_fields() find no Advanced Custom Fields values saved with a specific post, but calls to get_field() find values for the same post.

This happens when ACF did not insert the field values, and the secondary value with the meta_key beginning with an underscore does not exist.

The post has the values, but the Advanced Custom Fields plugin expects an additional value in a hidden field for each field.

ACF Creates a Second Key Value Pair

  1. my_custom_value
  2. _my_custom_value (this one is missing)

Leave a comment

Your email address will not be published. Required fields are marked *