How To Disable Emojis In WordPress

With WordPress 4.2 came native support for Emojis. Emojis originated from Japan and like smilies add emotional context to written communication. If you don’t have WordPress comments activated you may wish to disable them. Here’s how.

Why Disable Emojis?

To stop your visitors having to load this Javascript file:

Speed test - disable Emojis in WordPress

and remove this additional Javascript and CSS:

The WP Emoji code we want to disable

The impact your page load is almost negligible, but so is the time needed remove it.

Disable Without A Plugin

Just add this to the function.php file in your (child) theme:


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' );

Disable With A Plugin

Go and install the Disable Emojis plugin.  It’s a simple lightweight plugin with no advertising and is unlikely to need much updating.

Disable With WP Rocket

WP Rocket is a premium caching plugin for WordPress. As of version 2.7  there is an option to “replace emojis with default WordPress smileys”.  This is what I’m starting to use.

disable-emojis

Posted in
DWcircle

I build websites at WP Corner Shop and travel. I also co-host a weekly WordPress podcast called WP Builds and make YouTube videos.

1 Comment

  1. Harish on 19th October 2017 at 6:16 pm

    Hello Mr. David I recommend for you new version:

    https://wordpress.org/plugins/disable-emojis-littlebizzy/

    cheers bro

Leave a Comment





Do NOT follow this link or you will be banned from the site!