WordPress – How to remove wp-emoji-release.min.js and css

WordPress 4.4 introduced core support for emojis. This automatically converts emoticons in your content from their text representation to an icon.

To do this it added some JavaScript, CSS and an a JavaScript file (wp-emoji-release.min.js) to each and every page – which for most sites it is completely unnecessary, or at least the additional resource being loaded is not worth the benefit of this “feature”.

Fortunately it can be removed quite easily by running the following php code.

If you’re not sure where to place this code I highly recommend you read How to create a WordPress plugin for your custom functions.

remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );

 

For more information on emojis in WordPress see: https://codex.wordpress.org/Using_Smilies 

Was this article helpful?

Related Articles