-
-
Save julian-stark/e4d6bfc7a7b5d804255607da77e52553 to your computer and use it in GitHub Desktop.
<?php | |
// Deactivate Eicons in Elementor | |
add_action( 'wp_enqueue_scripts', 'js_remove_default_stylesheet', 20 ); | |
function js_remove_default_stylesheet() { | |
// Don't remove it in the backend | |
if ( is_admin() || current_user_can( 'manage_options' ) ) { | |
return; | |
} | |
wp_deregister_style( 'elementor-icons' ); | |
} |
Sadly this is causing a critical error on my site :( I guess because Elementor has changed and this is old, any ways to do it with the most recent elementor?
Thanks man. @julian-stark
Sadly this is causing a critical error on my site :( I guess because Elementor has changed and this is old, any ways to do it with the most recent elementor?
Thanks man. @julian-stark
❤️
// Deactivate Eicons at Elementor
add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 20 );
function remove_default_stylesheet() {
// Don't remove it in the backend
if ( is_admin() || current_user_can( 'manage_options' ) ) {
return;
}
wp_deregister_style( 'elementor-icons' );
}
Sadly this is causing a critical error on my site :( I guess because Elementor has changed and this is old, any ways to do it with the most recent elementor?
Thanks man. @julian-stark❤️
// Deactivate Eicons at Elementor add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 20 ); function remove_default_stylesheet() { // Don't remove it in the backend if ( is_admin() || current_user_can( 'manage_options' ) ) { return; } wp_deregister_style( 'elementor-icons' ); }
I updated the snippet. Thanks!
Hello guys,
I still have this in source code after turning off the eicons with this snippet.
<style id="elementor-frontend-inline-css"> @font-face{font-family:eicons;src:url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.eot?5.10.0);src:url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.eot?5.10.0#iefix) format("embedded-opentype"),url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.woff2?5.10.0) format("woff2"),url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.woff?5.10.0) format("woff"),url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.ttf?5.10.0) format("truetype"),url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.svg?5.10.0#eicon) format("svg");font-weight:400;font-style:normal} [class^="eicon"], [class*=" eicon-"] { font-family: "initial"; } [class^="eicon"]:before, [class*=" eicon-"]:before { content: ""; } </style>
Hello guys,
I still have this in source code after turning off the eicons with this snippet.
<style id="elementor-frontend-inline-css"> @font-face{font-family:eicons;src:url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.eot?5.10.0);src:url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.eot?5.10.0#iefix) format("embedded-opentype"),url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.woff2?5.10.0) format("woff2"),url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.woff?5.10.0) format("woff"),url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.ttf?5.10.0) format("truetype"),url(https://example.com/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.svg?5.10.0#eicon) format("svg");font-weight:400;font-style:normal} [class^="eicon"], [class*=" eicon-"] { font-family: "initial"; } [class^="eicon"]:before, [class*=" eicon-"]:before { content: ""; } </style>
Same issue
Still eicons.woff?5.10.0 (FCP/LCP) in Google Lighthouse test... (E 3.4.7 EP 3.5.1)
If you use Elementor Pro to build a header you might also need to use this CSS code for the hamburger icon: https://gist.github.com/julian-stark/08af8559a691b0b8b39bf7c509bcf1a7