Skip to content

Instantly share code, notes, and snippets.

@julian-stark
Last active April 14, 2023 09:05
Show Gist options
  • Save julian-stark/e4d6bfc7a7b5d804255607da77e52553 to your computer and use it in GitHub Desktop.
Save julian-stark/e4d6bfc7a7b5d804255607da77e52553 to your computer and use it in GitHub Desktop.
This is a nicer method to replace Eicons from Elementor. Don't remove it in the backend - Elementor is based on it ;)
<?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' );
}
@Tygovanommen
Copy link

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

@EXECdesign
Copy link

Still eicons.woff?5.10.0 (FCP/LCP) in Google Lighthouse test... (E 3.4.7 EP 3.5.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment