Home Forums Bug Reports File URL is showing File ID instead


File URL is showing File ID instead

  • Hello,

    I have created a custom field where the user will select a file, which will then automatically be added to a page with the embed press code either side.


    However, even though the return value is set as “File URL”, it is the “File ID” that is being injected onto the page.


    Does anyone know what the problem could be?

  • How are you pulling the field into the page? With a get_field or the_field call? Using something to help you do it?

    For an ACF field that gives you options on how to return a value like file and image, what gets stored in the database meta key is usually the ID. The choice on how you return the info only gets applied when using a the_field or get_field ACF call. So if you’re using something that is pulling custom fields with get_post_meta instead, that’s likely why you’re seeing the issue.

    Other times, I have seen ACF return a different value than what is selected before but usually toggling a different selection and saving then reselecting the alternative return value I want corrects it.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.