Skip to content

Instantly share code, notes, and snippets.

@JeffAspen
Last active April 30, 2026 15:51
Show Gist options
  • Select an option

  • Save JeffAspen/eec107dce0313ea432e87c903480caa4 to your computer and use it in GitHub Desktop.

Select an option

Save JeffAspen/eec107dce0313ea432e87c903480caa4 to your computer and use it in GitHub Desktop.
Elementor Remove Font Awesome
/**
* https://docs.elementor.com/article/286-speed-up-a-slow-site
*
* Note: By default, Font Awesome icons will only load on the pages where you've used them, so FA won't load on pages that aren't using any Font Awesome icons. This brings faster performance and faster page speed to your site, which can benefit your SEO and your users' experience. Only the CSS and fonts of the icon family you actually use are loaded. So only dequeue Font Awesome if you truly plan to not use any Font Awesome icons at all. If you dequeue Font Awesome, the icons will no longer show on any of your pages
*
*/
// Elementor - Remove Font Awesome
add_action( 'elementor/frontend/after_register_styles',function() {
foreach( [ 'solid', 'regular', 'brands' ] as $style ) {
wp_deregister_style( 'elementor-icons-fa-' . $style );
}
}, 20 );
@thewaliii
Copy link
Copy Markdown

Still not rendering though? Any idea why?
Screenshot 2024-02-04 013832
Screenshot 2024-02-04 013848

@jpuddle-stirling
Copy link
Copy Markdown

We still see the font-awesome library and shim load on all pages, even with the Inline Font Icons experiment turned on.

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