How to host Hestia fonts locally?
Hestia theme allows for local font hosting, and this article presents the required steps to do this.
Customizer toggle |
Code snippet |
π Note: Please note that by implementing the solution provided in this doc, all the fonts of your website will be hosted locally, including the ones from the third-party plugins.
π² Customizer Toggle
The Google Fonts can be hosted locally by simply enabling its toggle:
- 1
-
Navigate to Appearance > Customize > Appearance Settings > Typography.
- 2
-
Enable the Local fonts hosting toggle.
πNote: If you choose the second scenario (using a code snippet), it's important to keep in mind that it overrides the toggle.
π Code snippet
- 1
-
Copy the filter below.
- 2
-
Paste it into the currently active theme functions.php file or to the child theme file.
add_action( 'wp_print_styles', function() { add_filter( 'hestia_load_remote_fonts_locally', '__return_true' ); } );
π Note: A ready-made child theme for Hestia is available for download in this guide. We strongly recommend using the child theme, to avoid losing customizations once you update the parent theme.