Skip to content

Instantly share code, notes, and snippets.

@tomhemsley
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tomhemsley/9530157 to your computer and use it in GitHub Desktop.
Save tomhemsley/9530157 to your computer and use it in GitHub Desktop.
/**
* 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