Why I love WordPress? It’s because many developer and designer support out there. Some of them give us nice tutorial and tricks. On this post I will share to all of you about How To allow upload of more file types in WordPress.
All need to do only added extra functions on our themes and create WordPress Hooks using standard method WordPress API. This code original created by Pioupioum and we got nice share from WP Recipes. So enjoy it.
Allow Upload of More File Types Functions
<?php
function addUploadMimes($mimes) {
$mimes = array_merge($mimes, array(
'tmbundle|tmCommand|tmDragCommand|tmSnippet|tmLanguage|tmPreferences' => 'application/octet-stream'
));
return $mimes;
}
add_filter('upload_mimes', 'addUploadMimes');
?>
You can add more File Types on this code, by expanded on Line 4 and add your own file types. I hope tutorial How To Allow upload of more file types in WordPress work on you.




good post and thank you
Hi,
Could you write out a full example please? I’m not sure I follow your code…
More details you can read on here
Pingback: Tutorial and Trick Upload Wordpress Theme | Silver Blog
Pingback: WordPress for Android | Silver Blog
That’s a good tip, i know there are many people out there having trouble with this issue and looking for such explications. You should consider talking about file types and how are they working too, you seem to be qualified for such an article. There are more and more new file extensions appearing these days and they can be very confusing, they even make me feel frustrated sometimes.
Thanks for the tip. That was always something that bugged me. I’m going to be an uploading fool tonight!
That’s a good tip, i know there are many people out there having trouble with this issue and looking for such explications. You should consider talking about file types and how are they working too, you seem to be qualified for such an article. There are more and more new file extensions appearing these days and they can be very confusing, they even make me feel frustrated sometimes.