• Resolved CorwinPL

    (@corwinpl)


    I’m using file upload field in a loop (to make some kind of image gallery). I need to get both values of field id to achieve this construction:

    <img id="here i need attachement id of $field['photo_1']" src="$field['photo_1']" alt="">

    How do i get this?

    https://ww.wp.xz.cn/plugins/custom-field-suite/

Viewing 1 replies (of 1 total)
  • Plugin Author Matt Gibbs

    (@mgibbs189)

    Change your File field to return the Attachment ID instead of the File URL.

    You can use the wp_get_attachment_url() function to grab the URL from the attachment ID. And this also means you now have access to both the ID and the URL.

Viewing 1 replies (of 1 total)

The topic ‘File field both values’ is closed to new replies.