wpfaster-code-2

How to Remove Emoji Styles & Scripts in WordPress

WpFASTER Code 5 Comments

WordPress 4.2 + has added Emoji to the WordPress core. If you do not want or need Emoji it is best to remove/dequeue Emoji styles and scripts for better performance (less JavaScript and CSS = a good thing!). To remove Emoji from your WordPress site, copy and paste this code snippet — in plain text — to your functions.php file, or, add it with a plugin like Code Snippets.

remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); 
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' );

Comments 5

    1. Post
      Author
  1. mukesh jakhar

    this is greate tutorial men….thanks alot..
    you can also follow this code for better result……

    function disable_wp_emojicons() {
    // remove all actions related to emojis
    remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ );
    remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 );
    remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ );
    remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ );
    remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’ );
    remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ );
    remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ );
    }
    add_action( ‘init’, ‘disable_wp_emojicons’ );

Leave a Reply

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