Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search ACF file field uploads
This topic contains 2 replies, has 2 voices, and was last updated by Joel Udd 6 years, 10 months ago.
- AuthorPosts
- January 27, 2017 at 4:21 pm #11747
Hi,
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.
Regards,
JoelJanuary 30, 2017 at 12:39 pm #11760Hi Joel,
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,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 30, 2017 at 1:23 pm #11763Hi,
Thanks for the quick reply, and for the function!
Will use another solution instead of a lightbox then.
/Joel
- AuthorPosts
You must be logged in to reply to this topic.