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

0
Post Grid: Retrieving Custom Field / Meta Key for a custom 'File' Field. 1
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 user

Thanks for any help!

 

2 Subscribers
Post Grid: Retrieving Custom Field / Meta Key for a custom 'File' Field. 1
Post Grid: Retrieving Custom Field / Meta Key for a custom 'File' Field. 3
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
Post Grid: Retrieving Custom Field / Meta Key for a custom 'File' Field. 4
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

https://imgur.com/a/PzBNZE8

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

Post Grid: Retrieving Custom Field / Meta Key for a custom 'File' Field. 5
PickPlugins
- Jul 12, 2018 09:08 PM
Flag (0)
0

Glad to hear that.

Regards

Post Grid: Retrieving Custom Field / Meta Key for a custom 'File' Field. 6
jojo
- Jul 12, 2018 01:26 AM
Flag (0)
0

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

Post Grid: Retrieving Custom Field / Meta Key for a custom 'File' Field. 6
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