I've read the documentation and I've found your note about changing the font.
But I need to change the fonts via functions.php in my child theme via dequeing your fonts and enquing mine locally or via Google fonts (need to check about their GDPR policy).
Although we do not recommend changing the fonts (because you may need to do a lot of collateral changes - margins, paddings etc) you can use plugin such Easy Google Fonts
I think you should enqueue your fonts inside youser second function with
/* Translators: If there are characters in your language that are not supported by chosen font(s), translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Google font: on or off', 'munio') ) { $my_main_font_url = add_query_arg( 'family', urlencode( 'Poppins:300,400,600,700' ), "//fonts.googleapis.com/css" ); $my_secondary_font_url = add_query_arg( 'family', urlencode( 'Oswald:400,700' ), "//fonts.googleapis.com/css" ); }
Hey there,
I've read the documentation and I've found your note about changing the font.
But I need to change the fonts via functions.php in my child theme via dequeing your fonts and enquing mine locally or via Google fonts (need to check about their GDPR policy).
Can you please help on this achievement?
I would write (to be completed):
Is this correct?
Thanks and have a great day!
Ps it would be amazing to have in the future the possiblity to change fonts via the theme options.
Hi,
Although we do not recommend changing the fonts (because you may need to do a lot of collateral changes - margins, paddings etc) you can use plugin such Easy Google Fonts
https://wordpress.org/plugins/easy-google-fonts/
or
https://wordpress.org/plugins/use-any-font/
or for custom fonts
How can I add my own custom icons/fonts to the theme?
Thank you.
Clapat Support
https://www.clapat.com/
Review Envato Item Support Policy
Thanks for your answer,
but i don't want to use a plugin and i need to change the fonts as i said (and i've also read what your wrote about the fonts in the documentation!)
Is the code i've written ok?
Do i miss anything?
Thanks
Hi,
I think you should enqueue your fonts inside youser second function with
/*
Translators: If there are characters in your language that are not supported
by chosen font(s), translate this to 'off'. Do not translate into your own language.
*/
if ( 'off' !== _x( 'on', 'Google font: on or off', 'munio') ) {
$my_main_font_url = add_query_arg( 'family', urlencode( 'Poppins:300,400,600,700' ), "//fonts.googleapis.com/css" );
$my_secondary_font_url = add_query_arg( 'family', urlencode( 'Oswald:400,700' ), "//fonts.googleapis.com/css" );
}
wp_enqueue_style( 'my-main-font', $my_main_font_url, array(), '1.0.0' );
wp_enqueue_style( 'my-secondary-font', $my_secondary_font_url, array(), '1.0.0' );
ignore secondary font if you don't need it and replace font families and fonts weight
Thank you.
Clapat Support
https://www.clapat.com/
Review Envato Item Support Policy