0

I created custom theme in Wordpress and wanted to apply it to my site. Apparently, in the header section, besides the elements, weird text about emoji appeared. I found out that I have to turn out the emoji using "Disable Emojis" plugin or put some code right into functions.php. I have used this code and it worked:

function disable_emojis() {
 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' ); 
 remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
 remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); 
 remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
 add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
 add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 );
}
add_action( 'init', 'disable_emojis' );

It helped, text dissapeared but also all of my styling. Which means, that If I turn off the emojis, my style.css is not applied.

How to solve it ?

  • 1
    How did you turn off emojis? Please add that code to your question – kero Nov 27 '18 at 9:24
  • 1
    please comment this line remove_action( 'wp_print_styles', 'print_emoji_styles' ); – vikrant zilpe Nov 27 '18 at 9:40
  • solve your problem? – vikrant zilpe Nov 27 '18 at 10:17
  • Almost! Weird but most of the 'emoji' text dissapeared, but still some lines remains. I don't have idea what to do with it. – icelandico Nov 27 '18 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.