- January 27, 2017 at 4:21 pm #11747
I am using this plugin to search attachments thats has been uploaded with ACF file field.
What I need is to display some other info about the file, other than title and description. Such as file size and pixel dimensions.
This is data that is stored in the $file variable you get from the ACF file field.
I am also wondering if there is a possibility to open a lightbox with the file and some more information about it instead of going to another page when clicking the search results.
JoelJanuary 30, 2017 at 12:39 pm #11760
You could try the following custom filters to get the file size and dimensions, and print them to the results contents. Place it into the functions.php file in your active theme directory:
Make sure to change the $file_field variable value to the custom field name you store the files in. This works on my test environments, but it may depend on how ACF is configured.
The ligthbox is not possible without a larger amount of customizations, and it very much depends on your specification and needs.Best,
If you like my products, don't forget to rate them on codecanyon :)
January 30, 2017 at 1:23 pm #11763
Thanks for the quick reply, and for the function!
Will use another solution instead of a lightbox then.
You must be logged in to reply to this topic.