Skip to content

Instantly share code, notes, and snippets.

@thierrypigot
Last active August 13, 2017 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thierrypigot/bf655b0c6c08133e7e1dbde872ebdb21 to your computer and use it in GitHub Desktop.
Save thierrypigot/bf655b0c6c08133e7e1dbde872ebdb21 to your computer and use it in GitHub Desktop.
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