Site logo

[Resolved] Child Theme error

Home Forums Support [Resolved] Child Theme error

Home Forums Support Child Theme error

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2151021
    Clothilde

    Hi there !

    I’m having some issues with my website, I am in recovery mode in WordPress. Everything was working fine until this week, now I have this error showing up : Uncaught Error: Undefined constant “‘generate_typography_default_fonts’”.
    I use a Child Theme that was working fine until now.
    Can somebody help please ?

    #2151067
    David
    Staff
    Customer Support

    Hi there,

    do you have any snippets relating to the generate_typography_default_fonts function in your child theme ? If so can you remove that function as it will not work if you’re using the latest Dynamic Typography

    #2151090
    Clothilde

    Hi, thank you for your reply.

    Not sure this is what you are referring to, (sorry I’m a beginner), but in my functions.php, there is this code :
    add_filter( ‘generate_typography_default_fonts’, function( $fonts ) {
    $fonts[] = ‘Lora’;

    return $fonts;
    } );

    I did it a while ago, so I don’t really remember, but my intention was probably to use the “Lora” font I added.

    If I remove this, how can I still use this font ?

    I hope this makes sense

    #2151099
    David
    Staff
    Customer Support

    You can remove that Snippet.
    And now in GeneratePress 3.1 you have the new Dynamic Typography option:

    https://docs.generatepress.com/article/dynamic-typography-overview/

    Which includes all the Google fonts including Lora

    #2151110
    Clothilde

    Amazing ! Thank you for your help David !

    #2151119
    David
    Staff
    Customer Support

    You’re welcome

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