Social icons showing up as square

social icons

When you view your website, you found that the social icons in header and footer are showing up as squares instead of the respective icons. This could happen due to a few reasons. The following are the troubleshooting procedures.

Clear Cache Plugin or Server Cache

  1. If you are using a cache plugin such as W3 Total Cache or WP Super Cache plugin. You will need to clear it's cache content in order for the front end content to be updated.
  2. If your web hosting company has a server cache, you will need to clear it in order for your content to be updated on front end. You will need to contact your web hosting company, if you are not sure if there is any server cache on your web hosting package.

Check your Settings

You may have accidentally unchecked the Font Awesome icon setting and prevented the Theme from loading the necessary icon font files.

  1. Login to your WordPress dashboard.
  2. Go to Appearance -> Customize -> Advanced options -> Front end icons ( Font Awesome )
  3. Find and check the option Load Font Awesome resources
  4. Save and Publish
  5. Clear any cache and browser history.
  6. Re-visit your website.

Cross Origin Resource Sharing ( CORS )

Your icon font files could be loaded from a URL that has a different domain name structure than your website URL. This will result in Cross Origin Resource Sharing and browsers such as Firefox and Chrome will block your icon font files and prevent them from loading into your browser. This will result in icons showing up as squares.

There is two way to determine whether this is cause by CORS.

  1. View your website in Safari browser, you will be able to see your Social icons showing up properly. Your Social icons will only show up as squares in Firefox browser and Chrome browser.
  2. Look into the Console of developer tools such as Firebug for Firefox. You will see an error message similar to the following.

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (Reason: CORS header 'Access-Control-Allow-Origin' missing).

How to fix this?

  1. Login to your WordPress dashboard.
  2. Go to Settings -> General
  3. Find the settings -> WordPress Address (URL) and Site Address (URL)
  4. Make sure both settings has identical values. For example :-

If you are using a Content Delivery Network

If you are using a Content Delivery Network ( CDN ) to load your font files, you will need to contact your CDN provider and ask them for the codes to add in your .htaccess to enable Cross Origin Resource Sharing.
The is an example from a CDN provider.

You will need to contact your web hosting company for assistance, if you do not know what is a .htaccess file or how to alter it properly. Doing it wrongly will cause internal errors on your web server and crash your site.

Written by: Denzel Chia

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.