# Stop Elementor Icon Fonts Loading for Visitors

> Removes the Font Awesome and Elementor icon font stylesheets from the front end for visitors, which saves several requests on sites that use SVG icons or no icons at all.

- Type: PHP
- Runs: Frontend only
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: elementor, performance, icons, fonts
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/elementor-stop-icon-fonts-for-visitors/

## Code

```php
// Stylesheet handles to remove. Delete any you still need.
$wpide_el_icon_handles = array(
    'font-awesome',
    'elementor-icons',
    'elementor-icons-shared-0',
    'elementor-icons-fa-solid',
    'elementor-icons-fa-regular',
    'elementor-icons-fa-brands',
);

$wpide_el_dequeue_icons = function () use ( $wpide_el_icon_handles ) {
    if ( ! class_exists( '\Elementor\Plugin' ) || is_user_logged_in() ) {
        return;
    }

    if ( isset( $_GET['elementor-preview'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
        return;
    }

    foreach ( $wpide_el_icon_handles as $handle ) {
        wp_dequeue_style( $handle );
    }
};

// Head styles and the styles Elementor adds late, while widgets render.
add_action( 'wp_print_styles', $wpide_el_dequeue_icons, 100 );
add_action( 'wp_print_footer_scripts', $wpide_el_dequeue_icons, 1 );
```

## Notes

Only use this if your pages show no icon-font icons; turn on Elementor's "Inline Font Icons" feature first so icons render as SVG.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Stop Elementor Icon Fonts Loading for Visitors" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
