WordPress has a feature that automatically converts old ASCII smilies, such as “;-)” and “:-(“, to Unicode emojis, such as 😉 and 😞. While this feature may be useful for some users, it can also cause issues with formatting and compatibility with certain plugins and themes.
To prevent WordPress from automatically converting old ASCII smilies to Unicode emojis, you can add a line of code to your WordPress functions.php file or to a custom plugin.
Here’s an example of the code you can use to disable the conversion of smilies to emojis:
remove_filter( 'the_content', 'convert_smilies' ); remove_filter( 'the_excerpt', 'convert_smilies' ); remove_filter( 'comment_text', 'convert_smilies' );
Or add below code to theme’s functions.php file.
add_filter( 'option_use_smilies', '__return_false' );
By adding this code to your WordPress site, you can prevent the conversion of old ASCII smilies to Unicode emojis in the content, excerpt, and comments sections of your site.
It’s important to note that disabling this feature may affect the appearance of your content, especially if you are using a theme or plugin that relies on the smilies-to-emojis conversion. Therefore, it’s important to test your site thoroughly after making this change to ensure that it doesn’t cause any issues or conflicts.
Is there any other way?
- Download plugin WP Customizer.
- Enable toggle: Prevent WordPress from auto converting old ASCII Smilies to Unicode Emojis (;-) to 😉).
That’s it. And you are all set.
Simplest WordPress Optimizer & Customizer Plugin!
WP Customizer provides simplest, light weight, most powerful All-in-One 50+ Optimization, Customization, Webmaster, Database, Configuration, Fine-tuning Options in one single plugin 🥳.
Here is a list of all the emoticons that convert to emoji: