Actually I found out. Add this to the child theme functions.php:
//* Disable FontAwesome
add_action( ‘wp_enqueue_scripts’, function() { wp_dequeue_style( ‘font-awesome’ ); }, 50 );
//* To remove the Font Awesome http request as well
add_action( ‘elementor/frontend/after_enqueue_styles’, function () { wp_dequeue_style( ‘font-awesome’ ); } );
//* Disable eicons
//* add_action( ‘elementor/frontend/after_enqueue_styles’, function() { wp_dequeue_style( ‘elementor-icons’ ); } );
Hey @donaldjenkins
I also added a filter to the plugin to remove icons from the drop downs to go along with your dequeue of the actual FA files.
add_filter(‘eci_drop_fa’, ‘__return_true’);
//* Disable FontAwesome
add_action( ‘wp_enqueue_scripts’, function() { wp_dequeue_style( ‘font-awesome’ ); }, 50 );
//* To remove the Font Awesome http request as well
add_action( ‘elementor/frontend/after_enqueue_styles’, function () { wp_dequeue_style( ‘font-awesome’ ); } );
//* Disable eicons
//* add_action( ‘elementor/frontend/after_enqueue_styles’, function() { wp_dequeue_style( ‘elementor-icons’ ); } );
This isn’t working for me, have the style handle(s) changed? I tried switching it from ‘font-awesome’ to ‘elementor-icons-shared-0’ but that didn’t work. Are the Font Awesome styles enqueued anywhere else that needs adding?
After messing around a lot with this (since the old tricks seems not to work in recent versions of Elementor) – I disabled default icon sets like eicons and Font awesome by editing /wp-content/plugins/elementor/includes/frontend.php
just disable these lines:
wp_register_style(
'font-awesome',
$this->get_css_assets_url( 'font-awesome', 'assets/lib/font-awesome/css/' ),
[],
'4.7.0'
);
wp_register_style(
'elementor-icons',
$this->get_css_assets_url( 'elementor-icons', 'assets/lib/eicons/css/' ),
[],
'5.3.0'
);
A while ago the Elementor page with code to dequeue the icon styles was updated, and the new code worked for me:
https://docs.elementor.com/article/286-speed-up-a-slow-site