Open beckbeck-se opened 2 years ago
Sorry for the long wait! I just saw your request. 😄 This is a good idea. Since I'm working on a plugin for the Oxygen builder with this feature, I guess I could implement a similar solution for my Divi child theme. Stay tuned for the next major update!
Hi! Love the child-theme and just starting testing it.
An enhancement for the Self-hosted Fonts in DIVI would be a neat feature. (And maybe in the future download required fonts from the google-webfonts-helper API -https://github.com/majodev/google-webfonts-helper#rest-api )
I used your Child-Theme and added following PHP code in functions.php (Maybe adding a child_fonts.php file for this purpose?)
`/Multiple Custom DIVI FONTS - Monseratt and Open sans / add_filter('et_websafe_fonts', 'load_divi_custom_font',10,2); function load_divi_custom_font($fonts) { wp_enqueue_style( 'divi-child', get_stylesheet_directory_uri() . '/assets/css/fonts.css' ); // Add multiple fonts to Divi's font menu to acces them within DIVI $custom_font = array('Montserrat' => array( 'styles' => '300,400,500,700', 'character_set' => 'latin', 'type' => 'sans-serif', 'standard' => 1 ), 'Open Sans' => array( 'styles' => '400', 'character_set' => 'latin', 'type' => 'sans-serif', 'standard' => 1 ));
return array_merge($custom_font,$fonts); }`
Thanks again for a great Child Theme!