Custom Field Suite
[resolved] File upload shows ID regardless if ID or URL is selected (3 posts)

  1. Nick Powers
    Posted 4 years ago #

    I am running your plugin on my new recipe site http://cookncrazy.com

    I would like to use the URL of the uploaded image, but regardless of what is selected (URL or ID) it is always storing the ID.

    I can use wp_get_attachment_url but would rather be able to skip that step.

    Any help would be greatly appreciated!

    Good work, this version is working much better than ACF has recently.



  2. Nick Powers
    Posted 4 years ago #

    I replaced get_field with $cfs->get (Had to include global) and it's working now.

    I guess you are actually storing the ID in the field, and then if URL is selected your get function returns the URL. I can see why you did it that way (letting the end user switch between the two), but it's just different than what I expected.

  3. logikal16
    Plugin Author

    Posted 4 years ago #

    Nick, that's correct. The attachment ID is stored in the database.

    That way, we can either return the ID directly, or pass it through wp_get_attachment_url().

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Field Suite
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.