Site logo

Archived topic

Google font (Overpass)

9 replies · Started by mor on June 7, 2017

Viewing posts 1–10 of 10

Based on my search, I added this (Via Code Snippets):

add_filter( 'generate_typography_customize_list','tu_add_google_fonts' );
function tu_add_google_fonts( $fonts )
{
$fonts[ 'overpass' ] = array( 'name' => 'Overpass' );

return $fonts;
}

The font still doesn't show in the list.

Is there a different way?

Hi there,

Just tried and this worked for me:

add_filter( 'generate_typography_customize_list','tu_add_google_fonts' );
function tu_add_google_fonts( $fonts )
{
	$fonts[ 'overpass' ] = array( 'name' => 'Overpass' );
	
	return $fonts;
}

Not happening for me :(

Make sure the snippet is activated and check the bottom of the typography list.

Yesss! It's at the bottom. Why? (and thank you :) )

The way the filter works is it waits for the list to be built and then appends the new name after the alphabetizing has been done. I'll see if I can improve that :)

No rush :) Now that I know - I will know where to look for it.

Any idea how to get Elementor to get with the program show the font to show in the drop down?

Elementor would need their own filter/function for their list.

Thank you.

Glad we could help :)

This archived topic is closed to new replies.