Here in this quick post, I am going to explain about How to allow more MIME types in WordPress.
In the latest version of wordPress, you can upload the limited file types only. If the file you are trying to upload which is not supported, you will not be able to upload.
Read about: WordPress : To add custom post type into RSS
To customize media uploads in WordPress, you need to apply the filter to support other files.This filter can be used to customize the acceptable file extensions WordPress checks during media uploads.
If the file that you want to upload is not in the above list then you will not be able to upload the file.
1 2 3 4 5 6 7 8 9 | $mimes['ttf']='font/ttf'; $mimes['woff']='font/woff'; return $mimes; } |
Here, I have explained code about font upload, you can write code you want to.That’s it. Now you can check by uploading files you have written code.
Must Read: Customize Search in WordPress
Thank you for reading.Feel free to share your thoughts! Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.