![]() Open that file using your favourite IDE (such as PHPStorm or Notepad++) and locate the function containing the Google Fonts URL. Make sure to trigger this command inside your theme’s folder. grep "googleapis\|gstatic" * -r will return a list of all files containing the word ‘ googleapis‘ or ‘ gstatic‘. So the smartest way to find out the name of the function loading the fonts is to look for it using a terminal command called grep. Google Fonts are loaded from an URL looking similar to this: |Roboto+Slab:400,300,700 The steps are the same for every theme, the function name’s will just differ. After you’ve activated and verified it’s working, continue. If these words mean nothing to you, I suggest you skip back to the first chapter of this post and install OMGF.īefore continuing, make sure you’ve created a child theme for your theme following the steps from the WordPress documentation. You’ll also need a basic understanding of PHP and Bash. The hard way to remove Google Fonts from your WordPress theme involves creating a child theme. This option is mostly convenient, if you’re already running all sorts of custom optimizations on your site, preventing you to install OMGF or Autoptimize. Hard: Manually remove Fonts from WordPress using a Child Theme Now, if for some reason you don’t like easy, and you skipped reading this entire chapter, because it was too short and boring for you. Select ‘ remove Google Fonts‘ from the Google Fonts options menu,. ![]() How to Remove Google Fonts using AutoptimizeĪssuming you’ve already installed Autoptimize from the WordPress Plugin Directory, go to its settings page ( Settings > Autoptimize) and: One of its options is - guess what? - it removes Google Fonts. Simply put, if you want to achieve a high score on Google Pagespeed, Autoptimize’s the way to go. Who wants that?Ī WordPress plugin which I’ve mentioned several times, due its incredible optimization capacities. ![]() Chances are, visitors will view your pages in Times New Roman. Easy: Automatically remove Google Fonts using AutoptimizeĪnother easy way is to use Autoptimize, but I can’t stress this enough: blindly removing Google Fonts gives no guarantee what your pages will look like in different browsers and/or operating systems. If you’re a speed freak, this is what you’re looking for. Pro-tip: leverage OMGF Pro’s Fallback Font Stack feature to specify which system font (stack) should replace your Google Fonts. The plugin now offers fine grained control and allows you to specify which fonts (or font styles) to remove (or, unload) and which you’d like to keep.Īfter running OMGF’s Save & Optimize routine once, you can easily remove (unload) Google Fonts in the Manage Optimize Fonts section, by clicking the Unload All link next to a font-family.Īny fonts you decide to keep are automatically loaded from your server, i.e. Easy: remove Google Fonts using OMGF OMGF v5’s Unload All feature grants you fine-grained control over which Google Fonts you’d like to remove and/or keep (and load locally).īecause it’s not smart to blindly remove Google Fonts, OMGF’s automatic removal feature has been removed in v5.0.0. Today we’re going to discuss different ways - in varying difficulties - to remove Google Fonts from WordPress. You might want to get rid of them entirely. If you’re an absolute speed-freak, and you don’t care for Google Fonts. To make this process easier, I created OMGF: a WordPress plugin which automatically downloads any Google Fonts it finds and serves them from your server. But moving them to your server can be quite an exhausting process, especially if you’re using a lot of different fonts, weights and styles. That’s why it’s a smart choice to move external files to your own server and host them locally. External requests slow down your site’s loading speed. It might be a design or programming choice, but in most cases the reason is site optimization. Your motivation to remove the externally hosted Google Fonts from your blog may differ. Version 1.9.0 contains an experimental option to remove any Google Fonts that are enqueued in your WordPress blog.īut, for those where it doesn’t work, or for those that want to have full control, I provided an alternative: a complete guide on how to remove Google Fonts from your WordPress Theme. = != !=!=:=/= & & &= ++ +++ *** !! ?: ?.I’ve been getting a lot of requests lately, to implement a ‘Remove Google Fonts’-option into OMGF.Īfter a lot of research (a few months!) I managed to implement an efficient way to do it. A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |