I have searched high and low for an answer to this and can’t seem to find anything. I am trying to display a thumbnail for a File field and can’t get it to work. I have used the snippet from the documentation and all I get:
<a href="http://www.3badge.com/trade18/wp-content/uploads/sites/27/2018/02/BZ_ST4up_EBM.pdf" title="BZ_ST4up_EBM">
Can someone please help?
Thanks in advance!
Thanks for your response! Does this work for PFDs as well?
Yes, it does. If you set $icon to false it will return the thumbnail that was generated when the pdf was uploaded. For any file type that does not have thumbnails you need to set $icon to true and then you’ll get whatever icon WP thinks is best… this is hit or miss. The WP icons are not very good.