Skip to main content


WordPress: How to add custom fonts to a twenty seventeen child theme.

Quick help to those who have tried to find some help and failed (as I have so I have to write the code myself).
Assuming that you have your virgin child theme configured and activated: here is a function which goes into the functions.php file (of your configured and activated child theme):

function childtheme_twentyseventeen_fonts_url() {
$replace_original_font = true; // unless you really like Libre Franklin
if ($replace_original_font !== true) { $hyph = '-custom-'; } else { $hyph = '-'; };
$font_families = array(
//add your Google fonts and weights (400 and 700 are defaults for normal and bold) here:
$query_args = array(
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
$fonts_url = add_query_arg( $query_args, '' );
wp_enqueue_style( 'twentyseventeen' . $hyph . 'font…
Recent posts

How to Make a Website Everyone Has

I Feel So Old...