WordPress loads emoji scripts and styles on every page. Removing them can slightly improve page speed and reduce unnecessary requests.
Steps
- Open your WordPress theme
functions.phpfile. - Add the code below at the end of the file.
- Save the file.
- Clear your cache if you use a caching plugin or CDN.
Done — WordPress will stop loading default emoji scripts and styles.
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');