I have the same issue with a file field. I just recently started using ACF. I am running ACF PRO, v5.7.9 on WP 5.0.2 with ClassicEditor plugin 1.3 (in case that matters).
I found (sort of) a description of this problem in an old forum post, but I am not sure the problem should be there in the first place, since I didn’t code anything myself. More precisely, the older post describes misplacements of function calls, but I am using everything “out of the box”, not self-coded add-ons, child-themes or the like. Here is what I found earlier:
“dotancohen” wrote on March 16, 2016 (he is talking about an image field, but the same applies to the file field, I guess):
the_field()and the Image ID is returned instead of the expected return value, this is a sign that
acf_add_local_field_group()was not run. Therefore ACF is pulling the raw value from the database but has no way to determine in which format you want it.
To resolve the issue, ensure that
acf_add_local_field_group()is run from the
inithook, not one of the
If you can figure this out, I’d be curious to know, too.
Hope, this helps,
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 21, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.