Speeding-up WordPress by Removing Emoticons

Disable WordPress Emojis

If you’re website is like most, you don’t care that much about converting emoticons like :-) and :-P to graphics to display. However, your WordPress site is likely still loading the JavaScript and CSS that handles this every time the page loads. The good news is that you can turn it off, the bad news is that it’s not as easy as it once was, but still quite easy. When this was first introduced, there was a simple checkbox under SETTINGS > WRITING where all you had to do was check the box next to “Convert emoticons like :-) and :-P to graphics on display”. The Formatting section was removed in WordPress 4.3. New installs no longer have that set of options. In WordPress 4.3, that was removed, but if you knew how to get to the main WordPress Options page, by going to http://yourdomain.com/wp-admin/options.php (replace yourdomain.com with your actual domain name), you could find the setting for “use_smilies” and change the value from 1 to 0. My recent testing with this in WordPress 4.6.1 appears not to work however.

So, what can be done?

Disable Emojis in WordPress

There’s a super simple Plugin for this in the WordPress Plugin repository by Ryan Hellyer called Disable Emojis that you can install and activate. That’s it! Nothing more to do and now your WordPress site won’t load the Emoji JavaScript and CSS files any longer, making your site that much faster.

Another Way For The Slightly More Brave

You might be saying to yourself, “I don’t want to use another Plugin”. With WordPress, there’s always more than one way to do anything, so here’s an alternative.

All you have to do is add a few lines into your theme’s functions.php file. As noted in the article WordPress Child Theme Basics – Why They Should Always Be Used, be sure that you’re not adding this to a them that gets updated directly or the functions file will be over-written and the code you added, will be gone without you having realized it.


// Remove Emoji's
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' ); 
,
Previous Post
WordPress .htaccess Basics for Beginners
Next Post
Media Query Basics and Building for Responsive Sites

Related Posts

You must be logged in to post a comment.
Menu