Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Last active January 4, 2022 04:19
Show Gist options
  • Select an option

  • Save deckerweb/528e9f64f09b15ed4d6729b77d87dc78 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

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
Copy Markdown
Author

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

@steffendre
Copy link
Copy Markdown

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
Copy Markdown

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