View Categories

Filter permitted file types for uploading

By default, only certain image file types can be uploaded in the Pro version. You can filter these file types – but please be aware that there is a security risk with allowing users to upload files.

In your functions.php file, or other suitable place, add the following:

// Add PDF to permitted file types
function prefix_filter_mime_types( $mimes ) {
$mimes['pdf'] = 'application/pdf';
return $mimes;
}
add_filter( 'ctdb_existing_mimes', 'prefix_filter_mime_types' );