SupportCategory: Materialize HTMLZilla slab google font
Ronald Haver asked 1 year ago

Why can’t i select the Zilla Slab google font in the Materialize options?

5 Answers
Nazibul Hasan Staff answered 1 year ago

Hello,
Thanks for contacting us. Are you talking about theme options(http://prntscr.com/hxx5v5)? We see you selected Materialize HTML that is why we are a little bit confused.
Regards

Ronald Haver answered 1 year ago

Yes that’s what i am talking about. Cab i add the Zulla Slab google.font to that list?

Nazibul Hasan Staff answered 1 year ago

Hello,
We used redux framework for theme options and they still did not index Zulla Slab font yet. If you want, we can add that font by function.php file.
Best Regards

Ronald Haver answered 1 year ago

Thank you that would be great! Can you send me the code i have to add on the function.php?

Nazibul Hasan Staff answered 1 year ago

Replace the code in function.php

if ( ! function_exists( 'materialize_fonts_url' ) ):
    function materialize_fonts_url() {
        $font_url = '';
        if ( 'off' !== esc_html_x( 'on', 'Google font: on or off', 'materialize' ) ) :
            $font_url = add_query_arg(
                array(
                    'family' => urlencode( 'Open Sans:300,400,600,700,800,900|Roboto Slab:400,700|Zilla+Slab:400,600,700' ),
                    'subset' => 'latin',
                ), "//fonts.googleapis.com/css" );
        endif;
        return apply_filters( 'materialize_google_font_url', esc_url( $font_url ) );
    }
endif;