Skip to content

Instantly share code, notes, and snippets.

@neilgee neilgee/enqueue.php
Last active Oct 15, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.