Search ACF file field uploads

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 Joel Udd 6 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11747
    Joel Udd
    Joel Udd
    Participant

    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,
    Joel

    #11760
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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 :)


    #11763
    Joel Udd
    Joel Udd
    Participant

    Hi,

    Thanks for the quick reply, and for the function!

    Will use another solution instead of a lightbox then.

    /Joel

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.