• Tony

    (@ifaist0s)


    Hello and thank you for all the effort put in the plugin!

    I installed LGF plugin and I am using the Jupiter theme on WordPress 6.1 and PHP 8.0.25.

    Although LGF recognizes the fonts used by the web page https://snipboard.io/zhlaV0.jpg they are not loaded locally. i.e. I can still see the requests to Google servers with the Inspector on Firefox. When I activate another plugin “Disable & Remove Google Fonts”, the requests to Google servers stop, but the fonts on the web page are wrong.

    One more thing to note is that I checked on the server’s file system and I can see 3 directories under /wp-content/upload/fonts/ which contain the .woff2 files and .css But none of them seem to be loaded by the web page.

    I even purged Cloudflare’s cache and theme’s cache, just in case. But the result remains the same.

    Am I doing something wrong or…?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Tony

    (@ifaist0s)

    To anyone facing the same issue…. I managed to solve the problem by enqueuing the .css files (created by LGF) by adding this code in functions.php:

    
    function theme_assets() {
    
     // Load styles, replace stylesheet-name and stylesheet-path with your files
     wp_enqueue_style( 'stylesheet-name', site_url( $path = '', $scheme = null ) . '/wp-content/uploads/fonts/32f7d15b34e5fa64160a0275cf239273/font.css' );
     wp_enqueue_style( 'stylesheet-name', site_url( $path = '', $scheme = null ) . '/wp-content/uploads/fonts/ebc173c0fc97eef86a6e51ada56c5a9a/font.css' );
     wp_enqueue_style( 'stylesheet-name', site_url( $path = '', $scheme = null ) . '/wp-content/uploads/fonts/4e5949202c82dbee4c027f1c4548ab00/font.css' );
    
     // Load scripts in footer, replace script-name and script-path with your files
    // wp_enqueue_script( 'script-name', get_template_directory_uri() . '/script-path.js', '', '', true );
    
    }
    
    add_action( 'wp_enqueue_scripts', 'theme_assets' );
    
    rokokneslite

    (@rokokneslite)

    Is it functions.php in wp-include or theme folder?

    Plugin Author EverPress

    (@everpress)

    Hi there!

    It’s the themes function.php! Do not modify files inside wp-include as they get replcaed with the next WordPress update.

    Better would be to use wp_enqueue_style with the original Google font stylesheet and find them on the LGF settings page.

    This makes sure fonts are working even without LGF (of course loaded from Google servers).

    Hope that helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘LGF loaded – Fonts no’ is closed to new replies.