Created
June 3, 2019 10:37
-
-
Save deeman/44b9212310d6535fc2226a136c70d73f to your computer and use it in GitHub Desktop.
Elementor - Disable external scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //# Removing external scripts in Elementor #// | |
| // For Google Fonts: | |
| add_filter( 'elementor/frontend/print_google_fonts', '__return_false' ); | |
| // For Font Awesome Icons: | |
| // Also works on none Elementor-pages | |
| 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' ); } ); | |
| // For Eicons: | |
| add_action( 'elementor/frontend/after_enqueue_styles', function() { wp_dequeue_style( 'elementor-icons' ); } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment