Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Installation: Copy and paste this code into your themes functions.php file.
*
* NOTES: This will only add font options into the layer editor font dropdown menu,
* - it will not load the actual font from google onto your site
* - use a plugin like http://wordpress.org/plugins/wp-google-fonts/ to load the fonts onto your site
* - if you're using google fonts, you won't see the font applied to the text in the layer editor itself,
* but you will do when you view the slideshow on your site
*/
function metaslider_add_custom_fonts_to_layer_editor($custom_fonts) {
// define fonts in the format of "Display Title/fontFace". Each font seperated with a semi colon.
return "Raleway/raleway; Kavoon/kavoon; Roboto/roboto";
}
add_filter('metaslider_layer_editor_fonts', 'metaslider_add_custom_fonts_to_layer_editor');
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.