Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1487553

    Hi there,

    I’m struggling to import a font.
    The upload works, so that the .zip is added to the media gallery successfully, but importing to the manager won’t work. I get an error message that says ” Couldn’t add the font because the server didn’t respond. Please reload the page, then try again”. Reloading didn’t solve the issue.

    I also tried to upload the unzipped font folder via ftp. That worked so far, but I’m still not able to see the uploaded font in the font manager and the font doesn’t appear in the font settings.

    Do you have a solution for this?

    Thank you!

    #1487584

    Hey Blatze,

    Thank you for the inquiry.

    Where did you get the font? Please note that the Font Manager is intended for Google Fonts, and you will need to upload the font directly to the manager to register the font properly. Also, make sure that the PHP ZipArchive extension is enabled. You may need to confirm this with your hosting provider.

    Best regards,
    Ismael

    #1487617

    Hey there,

    thanks for your answer. Both fonts are Google Fonts. Regarding the PHP Zip Archive Extension – That’s what I was afraid of. I don’t have access to my customers hosting account. At least not yet. I guess there is no other solution that works without the hosting account?

    Thank you for your help!

    • This reply was modified 2 months ago by Blatze.
    #1487639

    Hi,

    To confirm if the Zip extension is enabled, you can add this code in the functions.php file:

    
    add_action('admin_notices', 'av_check_zip_extension');
    
    function av_check_zip_extension() {
        if (!class_exists('ZipArchive')) {
            echo '<div class="notice notice-error"><p><strong>PHP Zip extension is not enabled.</strong></p></div>';
        } else {
            echo '<div class="notice notice-success"><p><strong>PHP Zip extension is enabled.</strong></p></div>';
        }
    }

    If the extension is enabled, you should see this:

    View post on imgur.com

    If the zip extension is not enabled, you may need to register the fonts using a different method and manually apply them to elements using custom css. Please check the links below.

    https://www.wpbeginner.com/wp-themes/how-to-add-custom-fonts-in-wordpress/
    https://www.wpbeginner.com/wp-themes/how-add-google-web-fonts-wordpress-themes/

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.