Add custom google font to Beaver Builder theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add this function in the functions.php of your theme | |
add_filter( 'fl_theme_google_fonts', 'wearewp_theme_google_fonts' ); | |
function wearewp_theme_google_fonts( $google ){ | |
// Add a font from https://fonts.google.com/ : font name => font size (100, 200...) | |
$google['Saira'] = array( | |
"100", | |
"200", | |
"400", | |
"400", | |
"500", | |
"600", | |
"700", | |
"800", | |
); | |
// If you want to delete a font | |
unset( $google['Sail'] ); | |
// Order the new list | |
ksort( $google ); | |
// Return the updated list | |
return $google; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment