Today i was thinking about a nice little plugin that be could very useful: a download counter for WordPress media. I took a look on the internet and didn’t find what i was looking for, so i decided to do it myself. What i was thinking about was pretty simple: count downloads for media that are listed in the wordpress library and provide two shortcodes: the first one to display the download link, and the second one to display the number of times a media was downloaded.
So basically, the plugin offers these two shortcodes, and to make it a bit more useful i added a field in the edit media page, where you can manually modify the downloads value.
Here are the shortcodes to use:
- (edmc id=”xx”)Download the file(/edmc) – Link to download the file
- (edmc_show id=”xx” – Returns the sentence “Downloads: xx”