CSS disabled after getting rid of emoji

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 ?

Topic emoji functions css Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.