Skip to content

Instantly share code, notes, and snippets.

@JeffAspen
Last active June 26, 2024 23:57
Show Gist options
  • Save JeffAspen/eec107dce0313ea432e87c903480caa4 to your computer and use it in GitHub Desktop.
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

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

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