WordPress comes with built-in support for emojis, which can be a fun way to add personality to your content. However, some users may prefer to disable emojis for various reasons, such as to reduce page load time or to ensure consistency with their brand’s style. Fortunately, disabling emojis in WordPress is a straightforward process.
Emojis have become an integral part of online communication, especially in social media and messaging platforms. However, not everyone likes using them, and some people even find them annoying or distracting. If you’re one of those people, or if you simply want to optimize your WordPress site’s performance, you may want to consider disabling emojis. In this article, we’ll show you how to disable emojis in WordPress using a plugin and without plugin by code.
How to Disable Emojis in WordPress
There are two methods to disable emojis in WordPress:
- Disable Emojis in WordPress With Plugin
- Disable Emojis in WordPress With Code
1. Disable Emojis in WordPress With Plugin
There are many plugins available in the WordPress repository to disable emojis. The famous one we recommended is a free plugin called Disable Emojis.
2. Disable Emojis in WordPress With Code
Here are the steps to disable emojis in WordPress:
- Log in to your WordPress dashboard
- Go to the “Appearance” section and click on “Editor”
- Select “functions.php” from the list of files on the right-hand side
- Add the following code to the file:
// Disable emojis function disable_emojis() { 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' ); remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' ); } add_action( 'init', 'disable_emojis' ); // Filter function used to remove the tinymce emoji plugin function disable_emojis_tinymce( $plugins ) { if ( is_array( $plugins ) ) { return array_diff( $plugins, array( 'wpemoji' ) ); } else { return array(); } }
- Click “Update File” to save the changes
Once you’ve completed these steps, the emojis on your WordPress site will be disabled. Visitors will no longer be able to use emojis in comments, and WordPress will no longer load the emoji scripts, resulting in a faster page load time.
Conclusion
Disabling emojis in WordPress is a quick and easy way to streamline your site’s performance and ensure consistency with your brand’s style. By following the steps outlined in this article, you can disable emojis on your WordPress site in just a few simple steps. As always, be sure to back up your files and database before making any changes to your site to ensure that you can restore your site if anything goes wrong.