javascript - Error in Function to add Google Fonts in WordPress Theme -
i have following function in wordpress themes functions file should add google fonts theme. problem getting following error.
parse error: syntax error, unexpected '=', expecting ')' in /home/***/wp-content/themes/sienna/functions.php on line 382
anyone know how can fix please ?
heres function
// add google fonts function sienna_fonts_url() { $fonts_url = ''; $font_families = array(); $font_families[] = 'questrial'; $font_families[] = 'open sans:400,600,700'; $font_families[] = 'playfair display:400,700'; $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url_raw( $fonts_url ); }
many thanks,
scott.
there go:
function sienna_fonts_url() { $fonts_url = ''; $font_families = array(); $font_families[] = 'questrial'; $font_families[] = 'open sans:400,600,700'; $font_families[] = 'playfair display:400,700'; $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); return esc_url_raw( $fonts_url );
}
Comments
Post a Comment