Site icon Hip-Hop Website Design and Development

How to remove font awesome from loading in wp theme

Question:
How to remove font awesome from loading in theme and replace social icons with images?
Theme Hueman – WP Multisite install

What I did:

In the functions.php of a child theme from Hueman Theme, I add the following code:

add_action( 'wp_print_styles', 'tn_dequeue_font_awesome_style' );
function tn_dequeue_font_awesome_style() {
      wp_dequeue_style( 'fontawesome' );
      wp_deregister_style( 'fontawesome' );
}

In the
customizer > Advanced options> Adicional CSS

I insert the following:

.fa-facebook::before {
  content: url("https://example.com/wp-content/uploads/sites/3/2021/11/facebook-30.png");
width: 14px;
height: auto; !important; 
    }
.fa-twitter::before {
  content: url("https://example.com/wp-content/uploads/sites/3/2021/11/twitter-30.png");
}

The issue:

I tried with different child themes this last one is from the Child Theme Configurator plugin. Hueman ignores the styles.css and also the functions.php

Summary:

The images are replacing the Font Awesome icons but this files are still loading:

https://example.com/wp-content/themes/hueman/assets/front/webfonts/fa-brands-400.woff2?v=5.15.2
https://example.com/wp-content/themes/hueman/assets/front/webfonts/fa-regular-400.woff2?v=5.15.2
https://example.com/wp-content/themes/hueman/assets/front/webfonts/fa-solid-900.woff2?v=5.15.2
https://example.com/wp-content/themes/hueman/assets/front/css/font-awesome.min.css?ver=3.7.18