A few days ago I received a question from one of my readers ... He was looking for a simple method of showing file-specific icons next to his download links ...
Needless to say, there is a solution ...
But let's start with the obvious question: when/why you need attachment file type icons in Wordpress?
Here's the thing ... By default, Wordpress will allow you to upload several file types. Images, audio files, videos, etc. And when you upload a file through the media uploader in order to add it to a post/page, Wordpress will automatically embed the file if it is a supported file format.
On the other hand, if you upload an unsupported file type, Wordpress will just display the file name as a plain text link (pointing to the attachment or download page).
Here's the very same document uploaded as a Microsoft Word DOC file and a Microsoft Excel XLSX file:
And here's the live result:
The problem? It's really difficult for a user to guess which file they are downloading!
The point: you'll have to display a file type icon next to your download links, so your users can easily find the file type they’re looking for ...
This is is why I've decided to create this short tutorial where I will show you how to add attachment file icons in Wordpress for different file types.
Interested?
Let's do this!
Bookmarked for later! Thank you very much!
Sharlee (Chocolate IceCream)