I think this may be what your looking for. Below are a few examples of altering the default file types allowed by WordPress. Keep in mind that some hosting companies will disallow some file types.
Allow All File Types
Add the following to wp-config.php to allow for any file type.
define( 'ALLOW_UNFILTERED_UPLOADS', true );
Allow or Disable Specific Types
Add the following code into your theme’s functions.php
function my_custom_mime_types( $mimes ) {
// New allowed mime types.
$mimes['svg'] = 'image/svg+xml';
$mimes['svgz'] = 'image/svg+xml';
$mimes['doc'] = 'application/msword';
// Optional. Remove a mime type.
unset( $mimes['exe'] );
return $mimes;
}
add_filter( 'upload_mimes', 'my_custom_mime_types' );
Resources
Plugins
Related Posts:
- Using OOP in themes
- How can I allow the Editor Role to change Theme Settings?
- How to Link External jQuery/Javascript files with WordPress
- Undefined offset: 0 in > […] /wp-includes/capabilities.php on line 1067
- Editing Links in the Footer of WordPress Themes with Base64 Encrypted Code?
- How to set two different themes on one WordPress? (Desktop vs. Mobile)
- How can I add a set featured image function to a theme that doesn’t already have it built in?
- Jquery in Child Theme
- Display custom_background outside wp_head()
- register_theme_directory and broken deploys
- Retaining old HTML archives and displaying themes conditionally
- switch a theme different per user role
- How to make alert for new version on theme options?
- Can we create a child theme for a premium child theme built on Genesis framework?
- WordPress ignoring specified template for front page. Why?
- Migrating October CMS to WordPress
- Why are my sidebars not registering in unit tests
- Theme editor not showing correct index.php
- How to start learning CSS and theme development?
- How do I make the category template display full posts instead of partial posts?
- Does uninstalling a WordPress theme delete its database values?
- How to set a single theme directory on a multisite blog?
- PHP Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) on line 230 [closed]
- Child theme not using parent theme css/styles/formatting?
- Problem after renaming wordpress template file
- What’s the proper way to include inlined javascript-source?
- Create register form without a plugin
- Retina JS not working
- Get WordPress to use another custom “author.php” file (“custom-author-file.php”)
- wp_add_inline_style() not working?
- X-Axis of Site is Messed Up Because it is in Hebrew
- How to create my own sidebar in Twenty Eleven child theme?
- JavaScript Files Registered in Parent Theme Won’t Load When Calling wp_enqueue_script() in Child Theme?
- WP can’t create new directory
- style.css not reflecting changes. I have no cache installed
- Is it possible to create child themes using the WordPress Dashboard?
- Can I use wordpress themes without wordpress?
- Determing number the query ran by core wordpress
- Preserve theme settings when migrating from local to live
- Unable to access wordpress login.php [closed]
- Permissions for installing themes and files in general?
- Twenty Seventeen search error
- Protect shortcodes, custom JS, and CSS from theme updates
- Recommended Media Size for Twenty Fourteen
- for my current theme( own custom ) the default menu options are disabled in wp-admin?
- Most wp_nav_menu parameters ignored
- Free WordPress theme for an intranet tutorial site [closed]
- How do you remove a broken theme from WordPress Admin (without FTP or Cpanel)
- A wordpress site keeps editing wp-content files after migration
- Switching Theme and back will reset the previous Theme’s settings?
- Using Grunt and keeping theme comments
- Why are so many popular responsive WordPress themes “boxed” at 940px? [closed]
- Theme Modified By Updates
- I want to develop a theme using WordPress. Which theme should I start from or develop from scratch? [closed]
- Where did my Theme Editor go?
- Pages and posts on ElegantTheme featured slider [closed]
- Blackberry mobile theme redirection
- Child theme breaks after update of master theme
- Insert the current theme header into an external HTML/XHTML file
- How to use one git (github) repository for version control for multiple themes
- What’s the easiest way of adding more options in the Theme Options of the twenty eleven theme?
- Fix warning: Missing argument
- My first WP development project – am I envisaging this right?
- How can I fetch the next level of the currently selected main menu (hierarchical menu)?
- I’ve got a theme I can’t update and won’t let go
- Make theme settings support multisite enabled (WordPress Mu) site
- Is there any way to modify images from a theme using the web interface?
- Removing basic header/text elements from a theme
- how to get json file in wordpress template
- sidebar in 2020 theme as a widget
- Enqueue All Stylesheets Found In a Theme Folder
- Where to find child themes?
- how to create a section inside a section with theme options customizer
- WordPress thinks my custom theme is a theme in the public theme repository
- Warning: call_user_func() expects parameter 1 to be a valid callback
- Phone numbers showing same color as header [closed]
- Baskerville Theme – How to use the masonry grid layout on other pages
- Changing admin Textarea to integrated WP editor
- Line break no working on theme
- What is the template file for topic layouts in bbPress?
- Style of a theme
- Orion theme (from theme forest) [closed]
- QA/Staging envirnoment for wordpress sites
- Will this js code work in a page template?
- Diagnosing a connection reset problem
- Create /archive page in WordPress Theme
- Customising a theme
- Blog shows up without Theme/CSS styles
- Boldy theme – Regarding the images above the boxes
- Symbolic Links for themes – linking one theme to many wordpress installs
- Fatal error: Call to undefined function get_header() and BuddyPress [closed]
- How can I allow a client to edit certain parts of a static site?
- hardened wordpress linux install
- which theme is this? [closed]
- JQuery Error in theme for .live is not a function [closed]
- How can I either move the nav bar down or create more space for the header? Theme – Ajaira
- To create a theme or use an existing one? [closed]
- Overwrite functions.php of a theme – What if the theme is updated?
- How to add/edit content Custom Content item in theme
- Is there a WordPress theme for twittstrap? [closed]