How to remove emoji CSS from WordPress

in Code Write a comment

Learn how to disable emojis scripts from loading on your WordPress site. It will improve your site performance by loading pages faster.

I’ve also published 8 ways to optimise and speed up your WordPress blog.

As you probably know WordPress added support for emojis. By default, WordPress will convert :) into :).

To make it possible they built a wp-emoji-release.min.js script into WordPress core. It’s only 14KB in size but it generates an additional HTTP request to your server.

Disable emoji in WordPress

You can disable emoji on your site by adding this 2 lines of code to the functions.php file.

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

That’s it, it will no longer load wp-emoji-release.min.js file in the site header.

If you find this post useful, please let me know in the comments below. 
Cheers,
Renat Galyamov

Want to share this with your friends?
👉renatello.com/wordpress-disable-emoji

PS: make sure you check other WordPress tutorials, e.g. get featured image URL in WordPresswhy you should kill Disqus on your WordPress blog and download my plugin that improves your WordPress SEO & Performance.

Write a Comment

Comment