Post Grid: Retrieving Custom Field / Meta Key for a custom ‘File’ Field.

jojo
Jul 11, 2018 10:50 PM 1 Answers General
Member Since Jul 2018
Subscribed Subscribe Not subscribe
Flag(0)
Hello,• I'm using the pro version of 'Post Grid'.• Using ACF, I have added a custom 'file' field to my custom post type ("Resources"). For this custom field in ACF, I have chosen to return the value of the file's URL (not 'File Object' or 'File ID').• When displaying my posts with Post Grid, I can only seem to pull the file's ID. I have tested with a simple custom text field, and it displays alright, but I need to keep it as a 'file' selection field to keep things easier for the userThanks for any help! 
    2 Subscribers
    Submit Answer
    Please login to submit answer.

    1 Answers
    Sort By:
    Best Answer
    0
    PickPlugins
    Jul 11, 2018
    Flag(0)

    Welcome to our forum.

    I understand your issue, In this case i would like to suggest you to create a shortcode  for the expected output and you can use that shortcode by HTML element on layout editor

    View post on imgur.com

    You can get access to post id by following functions.

    get_the_id();

    I hope this way you can display better way than meta key field.

    I hope you understand.

    Please let me know if you need more help.

    Regards

    PickPlugins
    - Jul 12, 2018 09:08 PM
    Flag (0)
    0

    Glad to hear that.

    Regards

    jojo
    - Jul 12, 2018 01:26 AM
    Flag (0)
    0

    Success! After republishing my posts, things seem to work. Thank you!

    jojo
    - Jul 12, 2018 12:07 AM
    Flag (0)
    0

    To further clarify, I tried using the 'html' approach you mention, using an entry of: [acf field="resource_file_url"]

    This, however, returns not only the URL, instead outputting: ID, file name, file type, , , file URL.

    1+ more comments. Sign in to Reply
    Replying as Submit

    Please use https://imgur.com/upload to upload your screenshot and share url here.
    You can't upload any files or attachment to our server directly for security reason, you can use 3rd party website and share file url here. here is the top file sharing website you can use.

    Please login to see your tickets