How to add a custom font to Divi

Posted by George Nicolaou

On 26 Jan, 2021

How to add a custom font to Divi

I am going to try and show you how to add a custom font to Divi

The code I demonstrated before using the plugin to allow font mime types needs to be added in the functions.php file of your theme is shown below

Code for functions.php

 add_filter('upload_mimes', 'add_custom_upload_mimes');
 function add_custom_upload_mimes($existing_mimes) {
 $existing_mimes['ttf'] = 'application/x-font-ttf';
 $existing_mimes['otf'] = 'application/x-font-otf';
 return $existing_mimes;
 } 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Share This
Web Development 101How to add a custom font to Divi