Black Friday Sale! Get up to $30 off GP Premium! Learn more ➝

[Resolved] Font Awesome not loading – 404 error

Home Forums Support [Resolved] Font Awesome not loading – 404 error

Home Forums Support Font Awesome not loading – 404 error

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #221523
    Medora

    Just upgraded to premium and am very happy with this theme. I had been using genericons, and I just realized they no longer show up. Not sure what happened, but they reappeared after I added a new genericon plugin. I’d like to ditch the plugin and switch to FontAwesome icons, since they are already included in GP, but the console reports a 404 error for the file “…generatepress/fonts/fontawesome-webfont.woff2”. I recently installed a plugin to hide the wp-content folder (WP Hide & Security Enhancer) – could that be causing the 404 error for FontAwesome? I tried unhiding the wp-content folder but it didn’t make a difference. My website is under-development and password protected, so I can’t provide the site. Thank you for your time!

    #221529
    Tom
    Lead Developer
    Lead Developer
    #221875
    Medora

    Thanks for the advice! The file still has a 404 error, but the font awesome icons are loading correctly on my site (I just realized the magnifying glass search icon is font awesome, which has always displayed properly, and when I’d tried to add my own FA icons earlier, I had done it wrong).

    Based on that thread, here’s what I tried to fix the 404 error: I checked for the .woff2 file on the server, and it is in the GP fonts folder (along with five other font awesome files). I created a .htaccess file in my theme folder with the following contents:
    AddType application/font-woff woff woff2

    I don’t have any other .htaccess file except for one I created in a plugin folder. Is there something else I should try? Or should I not worry about the 404 error? Thank you!

    #221977
    Tom
    Lead Developer
    Lead Developer

    The .htaccess file should be in your root folder, along with the wp-content, wp-admin and wp-includes folders.

    Can you see it in there?

    #222128
    Medora

    I don’t see .htaccess in the root folder. Other sources indicate it could not exist, or it could be hidden. I moved the .htaccess I created into the root folder and did not enable overwriting. The FA file still has a 404 error when I refresh my website. I am very new to all of this (WordPress, website development, etc.) and I very much appreciate your help. Thank you.

    #222173
    Ramesh Srinivasan

    You may try this.. Slightly different setting for WOFF2.

    AddType application/font-woff2 .woff2

    via WOFF 2.0 · GitHub

    After adding, check the headers via this online Curl tool to see if it returns 200 OK.

    #222175
    Ramesh Srinivasan

    And let’s know if you’re on Windows hosting. That would be a completely different animal (as to how MIME settings are configured).

    #222207
    Medora

    Thanks Ramesh. I tried your suggestion in the .htaccess file, and the Curl tool reported “HTTP/1.1 200 OK”. I think I have windows hosting though – the host is smarterASP.net, which appears to only provide windows hosting. Someone else selected the host for us. What should I change assuming it’s windows? Thanks!

    #222214
    Ramesh Srinivasan

    Hi Medora,

    Windows hosting — thought so, as you said no .htaccess file exists in the root.

    In the Curl tool, please use the full path for the Woff2 file instead of your post URL.
    (or)
    Run a Pingdom test and check the waterfall report. That should show 404 errors if any.

    If those tools report 404, then try the MIME setting for IIS as in these links.

    How can I set MIME type for my site? – SmarterASP.net

    Set mime types for web fonts in IIS » Coding Still

    #222485
    Medora

    Thank you so much for those resources. I tried to follow the directions yesterday and got stuck, but am hopeful I will figure it out today. I’ll let you know it I get it working. Thank you!

    #222517
    Ramesh Srinivasan

    The 1st link is of the official help page of your hosting provider SmarterASP.net. So that might do the trick in most cases.

    Good Luck and keep us posted.

    #222890
    Medora

    I used the first link to set the mime types in my host, and the 404 error is gone. Had to do some additional research because my host interface was different from what was shown in the link, but finally got it to work. Thanks again!

    #222905
    Ramesh Srinivasan

    Ok. The Control Panel interface may have changed since they last published their Official KB. Glad you got this straightened out.

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