Astra integrates seamlessly with Google Fonts, giving you a wide variety of fonts to elevate your website’s design.
However, you might encounter a situation where the Google Fonts list appears blank within the “Typography” tab of the customizer. This indicates that the available Google Fonts aren’t loading properly on your website.
This can happen for a few reasons. This guide provides the information you need to effectively troubleshoot and resolve this issue.
Understanding the Cause: Why Google Fonts Might Not Load
Astra incluye un archivo con una lista de todas las fuentes de Google. Este archivo se lee cuando se muestran todas las fuentes google en el personalizador. Algunos de los proveedores de hosting tienen permisos de archivo incorrectos que no permiten leer el archivo. Y por eso la lista de Google Fonts se muestra vacía.
How to Fix Google Fonts Not Loading in Astra
Here’s how to fix it:
1. Check File Permissions:
The first step is to check your file permissions. Astra relies on a specific file to display the Google Font options. Contact your hosting provider and ask them to ensure the file located at wp-content/themes/astra/inc/assets/astra.php
has the correct permissions. In most cases, this file should have a permission setting of 644.
2. Force wp_filesystem Functions
If checking permissions doesn’t resolve the issue, this step is for advanced users comfortable with code editing.
You can force wp_filesystem utilizar archivo_get_* functions by adding a custom code. This will allow displaying all Google Fonts on your site. Add the following constant in your wp-config.php archivo.
define( 'FS_METHOD', 'direct' );
Esperamos que este documento le haya sido útil. Si tiene más preguntas, no dude en dejarnos un comentario a continuación.