Font Awesome Problem


#1

Hello,
Our site is www.sbcconsulting.in
In the “Services” widget of the home page, For “Conceptualisation” I have added a
Font Awesome icon named “Warehouse” picked up from
https://fontawesome.com/cheatsheet?from=io
In the “Services” dashboard of Perth I have added a code fa-warehouse. But still
it’s showing blank as seen in the attached screen shot. I also added only “Warehouse” also only the icon code “f494” once. But the result is same blank as you see. Can you please check and advise on the same ?


#2

Hello there,

Those icon class name might be only available in the newer version of Font Awesome script. To call the latest script, add this PHP code with a child theme.

    function perth_child_remove_default_fontawesome() {
       // Remove Font Awesome from main theme
       wp_dequeue_style( 'perth-font-awesome' );
    }
    add_action( 'wp_enqueue_scripts', 'perth_child_remove_default_fontawesome', 999 );

    function perth_child_add_fontawesome_cdn() {
      echo '<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">';
    }
    add_action('wp_head', 'perth_child_add_fontawesome_cdn');

Or use a plugin that allows PHP code addition like the Code Snippets.

Regards,
Kharis


#3

This script is working after I installed the “Code Snippets” plugin. Thanks !


#4

Great! Glad to hear that helped.

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis