[Support request] Google fonts didn't load

Home Forums Support [Support request] Google fonts didn't load

Home Forums Support Google fonts didn't load

  • This topic has 1 reply, 2 voices, and was last updated 7 years ago by Leo.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #291427
    Kharisma

    I added this code in Additional CSS like suggested in GP because my chosen font was not on the list. But the font list never changed/updated. It stayed at 200 most popular list. What did I do wrong?

    add_filter( 'generate_number_of_fonts','tu_show_all_available_google_fonts' );
    function tu_show_all_available_google_fonts()
    {
    	return 'all';
    }

    I also tried this code below. same thing. my chosen font was never added on the list.

    add_filter( 'generate_typography_customize_list','tu_add_google_fonts' );
    function tu_add_google_fonts( $fonts )
    {
    	$fonts[ 'milonga' ] = array( 'name' => 'Milonga' );
    	
    	return $fonts;
    }
    #291441
    Leo
    Staff
    Customer Support

    Hi Kharisma.

    Those are not CSS.

    Try using this method: https://docs.generatepress.com/article/adding-php/#code-snippets

    Let me know.

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