Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Last active January 4, 2022 04:19
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerweb/528e9f64f09b15ed4d6729b77d87dc78 to your computer and use it in GitHub Desktop.
Save deckerweb/528e9f64f09b15ed4d6729b77d87dc78 to your computer and use it in GitHub Desktop.
Astra Theme - disable Google Fonts
<?php
/** Do NOT include the opening php tag */
/**
* Do not load a list of Google Fonts in Astra
*
* @link https://gist.github.com/deckerweb/528e9f64f09b15ed4d6729b77d87dc78
* @author David Decker - DECKERWEB
*/
add_filter( 'astra_google_fonts_selected', '__return_empty_array' );
@stkjj
Copy link

stkjj commented Sep 6, 2019

nice one. Danke! Hab's in die functions.php eines Astra-Childs gekippt und die Roboto auch lokal abgelegt und im style.css entsprechend angezogen, aber trotzdem sehe ich noch einen Request auf fonts.googleapis.com !?

@deckerweb
Copy link
Author

Danke!
Das war letztes Jahr - ich muss da nochmal schauen, evtl. haben die was unter der Haube geändert.

@steffendre
Copy link

Hallo zusammen!

Vermutlich nicht mehr aktuell für Dich @stkjj, aber vielleicht für andere: Der Filter heißt nun anders, hiermit funktioniert es zumindest heute 🙂 :

add_filter( 'astra_google_fonts_selected', '__return_empty_array' );

@p2rvez
Copy link

p2rvez commented Sep 28, 2021

please update these codes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment