Skip to content

Instantly share code, notes, and snippets.

@thierrypigot thierrypigot/functions.php
Last active Aug 13, 2017

Embed
What would you like to do?
Add custom google font to Beaver Builder theme
<?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
You can’t perform that action at this time.