• Resolved chuno

    (@chuno)


    Hi,

    is it possible to use locally stored Google Fonts (I use Avada Theme) instead of loading theme via Google API?

    Thanks
    Chu

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Addons for Contact Form 7

    (@contactform7addons)

    Hi @chuno

    If you just want to use Roboto, and your theme already enqueues it, then yes you can simply dequeue the Roboto version that my plugin adds. You’ll have to ensure your theme has all the right weights (but mostly it just uses the one regular weight anyway).

    You can dequeue my plugin’s Google Font Roboto in your functions.php like this.

    function dequeue_cf7md_roboto() {
      wp_dequeue_style( 'cf7md_roboto' );
    }
    add_action( 'wp_enqueue_scripts', 'dequeue_cf7md_roboto' );

    Thanks,
    Angus

    Plugin Contributor Addons for Contact Form 7

    (@contactform7addons)

    Alternatively if you want to use a different font altogether, you can do the above, but you’ll also need to write some custom CSS to override Roboto. If you don’t want to do that, the pro version allows you to do it via the customiser.

    Thread Starter chuno

    (@chuno)

    I use pro and it worked.

    But it still loads Material Icons form Google. Any solution for that?

    Plugin Contributor Addons for Contact Form 7

    (@contactform7addons)

    Hi Chu,

    You can modify that code to the following to also dequeue the icon font.

    function dequeue_cf7md_fonts() {
      wp_dequeue_style( 'cf7md_roboto' );
      wp_dequeue_style( 'cf7md-material-icons' );
    }
    add_action( 'wp_enqueue_scripts', 'dequeue_cf7md_fonts' );

    Thanks,
    Angus

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Use locally stored Google Fonts?’ is closed to new replies.