Snippets: 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.

add_action( 'init', function() {
	remove_filter( 'the_content', 'convert_smilies', 20 );
	remove_filter( 'wpex_the_content', 'convert_smilies', 20 );
} );

Snippet Type: PHP

Posted Under: Other

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)