Only users with a registered purchase of Avada can post to the community forum. Please register your purchase here.
Only users with a registered purchase of Avada can post to the community forum. Please register your purchase here.

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • timavo
    Participant
    Post count: 4

    Michael C, thank you very much for your help!

    I found a solution on Stack Overflow to prevent Google Maps from loading the Roboto font.

    Create a /js/norobotofontbymaps.js in your child theme folder. Put this code into norobotofontbymaps.js:

    var head = document.getElementsByTagName('head')[0];
    
    // Save the original method
    var insertBefore = head.insertBefore;
    
    // Replace it!
    head.insertBefore = function (newElement, referenceElement) {
    
        if (newElement.href && newElement.href.indexOf('//fonts.googleapis.com/css?family=Roboto') > -1) {
    
            console.info('Prevented Roboto from loading!');
            return;
        }
    
        insertBefore.call(head, newElement, referenceElement);
    };

    Add this code to your functions.php:

    /*prevent roboto fonts loaded by google maps api*/
    $child_theme_url = get_stylesheet_directory_uri();
    wp_register_script( 'norobotofontbymaps', $child_theme_url.'/js/norobotofontbymaps.js', 'jquery', "1", true);
    wp_enqueue_script( 'norobotofontbymaps' );
    timavo
    Participant
    Post count: 4

    Link: http://www.za-hinkelmann.de/leer

    Password: AvadaHelp

    Active Plugins

    • Fusion Builder
    • Fusion Core
    • Password Protected
    timavo
    Participant
    Post count: 4

    Hi Michael C,

    I created a blank page (with only the header and footer) and deactivated ALL plugins (except the Fusion Builder). The Roboto font is still loaded from the Google CDN.

    Cheers
    Tim

    timavo
    Participant
    Post count: 4

    Hi,

    I set the Google fonts mode to ‘local’ but the fonts are still loaded from the Google CDN.


    https://pasteboard.co/HnHGh5X.png


    https://pasteboard.co/HnHGIhV.png

    Any ideas?

Viewing 4 posts - 1 through 4 (of 4 total)