Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active October 15, 2017 00:59
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 neilgee/b70262f6ff2f9b0c1774dbebb6c8c91c to your computer and use it in GitHub Desktop.
Save neilgee/b70262f6ff2f9b0c1774dbebb6c8c91c to your computer and use it in GitHub Desktop.
Beaver Builder Add Multiple Fonts To Plugin for Modules - https://wpbeaches.com/adding-web-fonts-beaver-builder-plugin/
<?php //<~ don't add me
add_action( 'wp_enqueue_scripts', 'prefix_scripts_styles', 997 ); // All the rest load before.
function prefix_scripts_styles() {
wp_enqueue_style( 'webfonts' , get_stylesheet_directory_uri() . '/webfonts/stylesheet.css', array() , '1.0.0', 'all' );
}
<?php //<~ don't add me
add_filter( 'fl_builder_font_families_system', 'me_added_fonts_builder' );
function me_added_fonts_builder( $system ) {
$system[ 'Neutra Text Book' ] = array(
"fallback" => "Geogia, serif",
"weights" => array(
"400",
)
);
$system[ 'Neutra Text Demi' ] = array(
"fallback" => "Geogia, serif",
"weights" => array(
"500",
"600",
"900",
)
);
return $system;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment