How to fix the error of font or icons not showing on your site

Most of the time a common error occurs on your website, you have set the font or font awesome icons but they are invisible. Your icons are viewed in a form of squares and the font family which you have set is not working. Icons don’t show up and you are unable to fix this error. For this I am giving you a simple code by which you can easily fix it, follow my below instructions:-

    • First, open your browser developer tool by pressing the f12 key or right-click the mouse button > Inspect element and go to console.
    • After that check in the console if this error is displaying –
Access to Font at 'Your site link’ from origin 'Your site link' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'Your site link' is therefore not allowed access.
    • Now go to .htaccess file which is your main server configure file, edit the .htaccess file located at the root of your WordPress installation and add this code to the bottom of the file:
  <FilesMatch "\.(ttf|otf|eot)<pre wp-pre-tag-1=""></pre>quot;>
 <IfModule mod_headers.c>
 Header set Access-Control-Allow-Origin "*"
 </IfModule>
</FilesMatch>

Final Words: –  I hope my tutorial will help you to understand How to fix the error of font or icons not showing on your site and you will easily fix this error using the code. If you have another query related to this blog just post your comment below.

Read More –