Skip to content

Snippet: Remove Smile Emojis

By default WordPress converts :) into a smile emoji on the frontend. The following code disables the conversion so that it will still render as plain text.

/**
 * Remove Smile Emojis
 *
 * @link https://totalwptheme.com/docs/snippets/remove-smile-emojis/
 */
add_action( 'init', function() {
	remove_filter( 'the_content', 'convert_smilies', 20 );
	remove_filter( 'wpex_the_content', 'convert_smilies', 20 );
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top