Add Mime Types In Wordpress

If you are having trouble uploading a specific file with wordpress. Chances are they file type might not be allowed. However there is always a way to tell wordpress to recognize the file type. You can add the following code to your theme’s function.php

function cc_mime_types($mimes) {
  $mimes['svg'] = 'image/svg+xml';
  return $mimes;
}

add_filter('upload_mimes', 'cc_mime_types');

The code above will allow you to upload svg files to wordpress. Read more about mime types here

Amiel Simbahon

Amiel Simbahon
Software Maker

Option Page for your Plugin or Theme

How to add option page to your plugin or theme. Continue reading

Wordpress Ajax Frontend

Published on February 21, 2017

Human Readable Filesize

Published on February 21, 2017