Site logo

Archived topic

Adding google fonts

1 reply · Started by Josh on November 10, 2021

Viewing posts 1–2 of 2

I Can usually add google fonts to my site, but after the new updates it seems to not be working.

I add this code to my functions.php


add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
function tu_add_google_fonts( $fonts ) {
	$fonts[ 'midieval_sharp' ] = array( 
		'name' => 'Midieval Sharp',
		'variants' => array( '400' ),
		'category' => 'cursive'
	);

	return $fonts;
}

Then I would go to the customizer and choose the font that I want. After the update I have to add a font first. My font does not display in the options though, even when my code has been placed in my functions.php.\

Is there a new way this is supposed to be achieved?

This archived topic is closed to new replies.