skip to Main Content

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://total.wpexplorer.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 the Code Snippets Plugin (or alternative plugin)
Back To Top