[Resolved] Google font (Overpass)

Home Forums Support [Resolved] Google font (Overpass)

Home Forums Support Google font (Overpass)

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #330017
    mor

    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?

    #330019
    Leo
    Staff
    Customer Support

    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;
    }
    #330021
    mor

    Not happening for me πŸ™

    #330026
    Leo
    Staff
    Customer Support

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

    #330028
    mor

    Yesss! It’s at the bottom. Why? (and thank you πŸ™‚ )

    #330030
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #330031
    mor

    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?

    #330034
    Tom
    Lead Developer
    Lead Developer

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

    #330035
    mor

    Thank you.

    #330041
    Leo
    Staff
    Customer Support

    Glad we could help πŸ™‚

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.