How to remove emoji scripts from WordPress head

To remove the emoji scripts from the head of your WordPress site, you can use the remove_action() function. This function allows you to remove an action hook that has been registered with WordPress.

To remove the emoji scripts, you can use the following code in theme functions.php:

// Remove emoji scripts from WordPress head
// More snippets at wpunplugged.com 

remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );

Note that this code will only remove the emoji scripts from the head of your site. If you also want to disable the emoji feature completely, you can add the following code to your site’s wp-config.php file:

// Remove emoji scripts from WordPress head
// More snippets at wpunplugged.com 

define( 'DISABLE_WP_EMOJI', true );

This will disable the emoji feature completely, including the conversion of emoji characters to images in the content of your site.

Share this post

You might also like...

Pre-built websites in BeTheme
Themes

Betheme for WordPress Review

Betheme is a WordPress theme that has been described as one of the most powerful and versatile themes available for WordPress. In this Betheme for

Read More »

Comment

Your email address will not be published. Required fields are marked *