Public Ticket #2233147
Louis George Cafe font


  • griparicurse started the conversation


    I want to use Louis George Cafe font for a heading in my page (just like in your "Brook business home page" but I cannot find it in the list of font-families in "heading" element on WP Bakery.

    I've tried to put this code in my functions.php child theme file : 

    // Add custom font to font select
    add_filter( 'kirki_fonts_standard_fonts', 'brook_child_add_custom_font' );
    function brook_child_add_custom_font( $fonts ) {   $fonts['louis_george_cafe'] = array(      'label'    => 'Louis George Cafe',      'variants' => array( 300, '300italic', 'regular', 'italic', 700, '700italic' ),      'stack'    => 'Louis George Cafe, sans-serif',   );   return $fonts;
    // Enqueue custom font
    add_action( 'brook_enqueue_custom_font', 'brook_child_enqueue_custom_font' );
    function brook_child_enqueue_custom_font ( $font ) {   if( $font === 'Louis George Cafe' ) {       wp_enqueue_style( 'louis-george-cafe-font', get_stylesheet_directory_uri() . '/assets/fonts/louis-george-cafe/louis-george-cafe.css', null, null );   }

    The louisgeorgecafe.css was already there in my parent theme.

    Please could you tell me how to do ?


  •  896
    Linh replied


    The font will display in Customize section to apply for your site. 

    The code does not add custom font for default element of wordpress/visual.