↳ Ver todos los 14 artículos
/ Documentación /Personalización de temas/ Google Fonts no se carga con Astra

Google Fonts no se carga con Astra

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\assets\fonts\google-fonts.json 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_* añadiendo un código personalizado. Esto permitirá mostrar todas las Google Fonts en su sitio. Añada la siguiente constante en su 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.

¿Fue útil este documento?
¿Qué salió mal?

No respondemos a los comentarios de los artículos, los usamos para mejorar nuestro contenido de soporte.

¿Necesitas ayuda? Contactar Soporte
En esta página
Scroll al inicio