Support

Account

Home Forums General Issues get_field() returns false until post is resaved, but i have 1000+ posts! Reply To: get_field() returns false until post is resaved, but i have 1000+ posts!

  • This depends on how you are migrating the database and the types of fields involved.

    Every meta value for a post has a corresponding acf field reference meta value. For example, if you have a field named “my_field” there are 2 entries in the database.

    
    meta_key  | meta_value 
    my_field  | value of acf field
    _my_field | field_1234xyz
    

    More than likely, however it is that you are migrating the data the field value is being migrated, but the field key reference is not. This will work for simple text based fields (that are not in a repeater or flex field), but anything more complicated that this and ACF will be unable to get the value of the field.

    The other possibly is that the field keys on one site do not match the field keys for the same field on the second site. This is only likely if you manually created the field groups on both sites independently.