[Resolved] Remove Google fonts

Home Forums Support [Resolved] Remove Google fonts

Home Forums Support Remove Google fonts

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #997600
    Kim

    Hi, I’ve tried to remove the Google fonts from the customizer (as said in this post https://docs.generatepress.com/article/remove-google-fonts/). When I try to activate it I always get this error message:

    Cannot redeclare tu_remove_google_fonts() (previously declared in /home/wp/disk/wordpress/wp-content/plugins/code-snippets/php/snippet-ops.php(361) : eval()’d code:3)

    It is causing a fatal error in line 4. Am I doing something wrong?

    #997601
    Leo
    Staff
    Customer Support

    Hi there,

    Try this instead:

    add_action( 'admin_init', 'tu_remove_google_fonts_customizer' );
    function tu_remove_google_fonts_customizer() {
        add_filter( 'generate_google_fonts_array', '__return_false' );
    }

    Let me know if this helps πŸ™‚

    #997606
    Kim

    Awesome! Works perfectly πŸ™‚

    #997623
    George

    This code always breaks my customiser.

    #997818
    Leo
    Staff
    Customer Support
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.