Skip to content

Instantly share code, notes, and snippets.

@andrastudio
Created September 19, 2016 02:07
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save andrastudio/cc2d7a3c8ca0cd405c89691fd04eeb11 to your computer and use it in GitHub Desktop.
Save andrastudio/cc2d7a3c8ca0cd405c89691fd04eeb11 to your computer and use it in GitHub Desktop.
Add new google fonts to Visual Composer Custom Heading
if ( ! function_exists( 'helper_vc_fonts' ) ) {
function helper_vc_fonts( $fonts_list ) {
$poppins->font_family = 'Poppins';
$poppins->font_types = '300 light regular:300:normal,400 regular:400:normal,500 bold regular:500:normal,600 bold regular:600:normal,700 bold regular:700:normal';
$poppins->font_styles = 'regular';
$poppins->font_family_description = esc_html_e( 'Select font family', 'helper' );
$poppins->font_style_description = esc_html_e( 'Select font styling', 'helper' );
$fonts_list[] = $poppins;
return $fonts_list;
}
}
add_filter('vc_google_fonts_get_fonts_filter', 'helper_vc_fonts');
@trisghosh
Copy link

Great Help

@notrealdev
Copy link

👍

@leonhoffmann86
Copy link

Thanks

@advokatb
Copy link

Can this snippet be used to add custom font with @font-face?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment