I'm using the Font Organizer plugin for Wordpress. It has a nice option to upload a font, which I have saved to my computer. I just need to somehow get Wordpress to accept it so I can use it here:
However, I'm getting an error: Error uploading the file: Sorry, this file type is not permitted for security reasons.
How do I let Wordpress temporarily allow this? Also, is this method even going to work out? The end goal is for it to show up on the drop down list in the image above because I need to change the font of the header text. I can do any programming stuff needed.
You can allow uploading the .ttf font on your site, by adding a simple filter code on function.php file.
Below is the code for .ttf font only
add_filter('upload_mimes', 'add_custom_upload_mimes');
function add_custom_upload_mimes($existing_mimes) {
$existing_mimes['ttf'] = 'application/x-font-ttf';
return $existing_mimes;
}
You can add more MIME type in the function to allow to upload those file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With