If you’re looking to improve the performance of your WordPress site, there’s lots you can do. From the server it sits on to the PHP logic, they can range from the complex to the simple.
One way is to reduce the number of scripts and stylesheets that WordPress and your specific theme loads. In this case, we’re looking at disabling the script and stylesheet that allows WordPress to use emojis. For sites that don’t expect to use them, this is a no-brainer.
To disable the emoji script in WordPress, just add the following code to your theme’s functions.php file:
// Enabled by default, use this code to disable the emoji script and accompanying stylesheet - RobCallaghan.co.uk remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'wp_print_styles', 'print_emoji_styles' );
And that’s it! Done.
Let me know how you get on in the comments below.