Search
Close this search box.

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

Sucuri for WordPress Review
Plugins

Sucuri for WordPress Review

Sucuri for WordPress is a powerful security plugin that helps protect your website from hackers and malicious software. It provides a comprehensive website security solution,

Read More »

Comment

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