Home › Forums › General Issues › ACF File – Preview of document › Reply To: ACF File – Preview of document
There isn’t any way to change the icon shown by ACF.
There are 2 hooks that might be used to alter what is displayed.
The first is acf/prepare_field https://www.advancedcustomfields.com/resources/acfprepare_field/. There isn’t much documentation on this one, but I don’t think it will let you do what you want to do. You’d need to figure that out.
The other hook is acf/render_field https://www.advancedcustomfields.com/resources/acf-render_field/. This hook also will not do what you want but it would let you add html to the field to show additional information, like a thumbnail of an image. I can’t say if you can show a PDF or other file type. You can see an example of using acf/render_field used to show and image for a URL field here https://github.com/Hube2/acf-filters-and-functions/blob/master/render-image-in-editor.php
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Plugin boilerplates can do some of the heavy lifting during initial development. We look at four options to speed up your plugin creation. https://t.co/ZtMsdBxAHw
— Advanced Custom Fields (@wp_acf) June 5, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.