Snippets: Custom Google Font Lists

Using a filter you can select which Google Fonts are available when selecting fonts in the Customizer or in Visual Composer page builder modules. So instead of loading hundreds of options you can load only the ones you will be using on the site.

Important: You can now register your own fonts right via the WP admin via the exclusive Total theme Font Manager.

function myprefix_google_fonts( $array ) {
    return array( 'Open Sans', 'Roboto', 'Source Sans Pro' );
add_filter( 'wpex_google_fonts_array', 'myprefix_google_fonts' );
All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)