I have posts with custom fields created by acf. These fields get filled by external code which works so far. See Screenshot #1.
I can access the values via get_post_meta but not with get_field. get_field returns nothing. I think because the field_key relationships are missing. when i open one post in wp-admin and just click “update” without changing anything, get_field now returns the values. i try to fix this by a bulk code instead of opening/saving each post by hand:
when loading wp, all fields get the field key relationships as you can see in screenshot #2. but still i am not able to retrieve the field values with get_field. still have to save the post once to get this working. what do i miss here?!
Thanks, John! nicmare asked the question “still have to save the post once to get this working. what do i miss here?!” is this related to my wish that I want to find a way to change some posts in a way that I export them, incl the proper (field value, fiel key) pairs; modify some values and finally import them back? What do I miss there?
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘get_post_meta works but get_field not’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users