Home › Forums › Bug Reports › Image File Type Return Value not working › Reply To: Image File Type Return Value not working
When using get_field()
or 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 init
hook, not one of the admin_*
hooks.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.