How To Remove Emoji Scripts And Styles In WordPress Without A Plugin

Development 2 min read
WordPress has great emoji support in core. For older browsers that do not support emoji's, it uses a JavaScript and CSS fallback. This is great as everyone gets a consistent user experience. However, many do not like having a script and style loaded in the header of their website. This is because not everyone uses the script or wants them on their website. Therefore I am going to show you how to remove emoji scripts and styles in WordPress without a plugin.

Step 1: Open your functions.php file. Or an existing kitchen sink plugin.

This code can be added to your functions.php file, or to an existing plugin that is on your website (A kitchen sink plugin, if you would).

Step 2: Insert the following code to remove emoji scripts.

You could also add this to a theme, if you are wanting to add it as an option! Anyways, the below code will remove any trace of the scripts and styles for WordPress' emoji's.
remove_action( 'wp_head', 'print_emoji_detection_script', 10 ); 
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); 
remove_action( 'wp_print_styles', 'print_emoji_styles' ); 
remove_action( 'admin_print_styles', 'print_emoji_styles' );
If you have any questions on where to put this code, please feel free to ask them below or contact us and I will be able to help you!
Scott Hartley

Scott Hartley

Founder & CEO, Sert Media

Founder and CEO of Sert Media, a Nashville-based digital marketing agency. Scott has spent over 15 years helping businesses grow through SEO, web performance optimization, and strategic digital marketing. His deep expertise in WordPress development, site speed, and technical SEO has guided hundreds of brands toward measurable results. When he's not auditing Core Web Vitals or refining campaign strategies, he's writing about the tools, techniques, and trends shaping the modern web.

Leave a Comment

Your email address will not be published. Required fields are marked with an asterisk.

Related Articles