Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Coppa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Come disattivare le Emoji in WordPress (passo dopo passo)

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

Volete disabilitare le emoji sul vostro sito WordPress?

Le emoji sono piccole icone utilizzate per esprimere sentimenti o emozioni. WordPress carica CSS aggiuntivi e un file JavaScript per aggiungere il supporto alle emoji, quindi alcuni utenti potrebbero volerli rimuovere per migliorare la velocità e le prestazioni della pagina.

In questo articolo vi mostreremo come disabilitare facilmente le emoji in WordPress, passo dopo passo.

How to disable emojis in WordPress 4.2

Cosa sono le emoji?

Leemoji sono le piccole icone o faccine utilizzate su Internet.

Originarie del Giappone, le emoji sono entrate a far parte del set di caratteri Unicode e sono ora supportate dai computer desktop e dai dispositivi mobili iOS e Android.

Questa funzione è stata introdotta per la prima volta in WordPress 4.2 e il motivo principale per cui è stata aggiunta è stato il supporto nativo per i set di caratteri delle lingue cinese, giapponese e coreana.

Emojis example

Per impostazione predefinita, il sito WordPress carica un file JavaScript aggiuntivo e alcuni CSS per aggiungere il supporto alle emoji.

Lo si può vedere visualizzando il codice sorgente del sito web o utilizzando lo strumento Inspect.

Emoji JavaScript in WordPress

Tuttavia, alcuni proprietari di siti potrebbero voler disabilitare questo supporto emoji extra per aumentare la velocità di caricamento di WordPress e le prestazioni, evitando di scaricare codice e script aggiuntivi.

Nota: quando si parla di disabilitare gli emoji in WordPress, si intende disabilitare i controlli e gli script aggiuntivi utilizzati da WordPress per gestire gli emoji. Potete comunque utilizzare gli emoji sul vostro sito e i browser che li supportano saranno ancora in grado di visualizzarli.

Detto questo, vediamo come disabilitare facilmente il supporto alle emoji in WordPress.

Metodo 1. Disabilitare le Emoji in WordPress con il codice

Per questo metodo, utilizzeremo uno snippet di codice personalizzato per disabilitare il supporto alle emoji in WordPress.

Potete aggiungere questo frammento di codice al file functions.php del vostro tema WordPress o a un plugin specifico per il sito. Tuttavia, un piccolo errore nel codice potrebbe facilmente rompere il vostro sito web e renderlo inaccessibile.

Per evitare ciò, vi consigliamo di utilizzare WPCode. È il miglior plugin per gli snippet di codice di WordPress sul mercato, che offre il modo più sicuro per aggiungere codice personalizzato al vostro sito senza romperlo.

Per prima cosa, è necessario installare e attivare il plugin WPCode. Per ulteriori istruzioni, consultare la nostra guida per principianti su come installare un plugin di WordPress.

Dopo l’attivazione, visitare la pagina Code Snippets ” + Add Snippet dalla dashboard di amministrazione di WordPress. Da qui, andare all’opzione “Aggiungi il tuo codice personalizzato (nuovo snippet)” e fare clic sul pulsante “Usa snippet”.

Add new snippet

Si accede così alla pagina “Crea snippet personalizzato”, dove si può iniziare a digitare un nome per il proprio snippet di codice. Può essere qualsiasi cosa si voglia.

Quindi, selezionare “Snippet PHP” come “Tipo di codice” dal menu a discesa nell’angolo destro dello schermo.

Type a name for your code snippet and choose PHP as code type

A questo punto, non resta che copiare e incollare il seguente codice nella casella “Anteprima codice”:

/**
 * Disable the emoji's
 */
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' );

/**
 * Filter function used to remove the tinymce emoji plugin.
 * 
 * @param array $plugins 
 * @return array Difference betwen the two arrays
 */
function disable_emojis_tinymce( $plugins ) {
 if ( is_array( $plugins ) ) {
 return array_diff( $plugins, array( 'wpemoji' ) );
 } else {
 return array();
 }
}

/**
 * Remove emoji CDN hostname from DNS prefetching hints.
 *
 * @param array $urls URLs to print for resource hints.
 * @param string $relation_type The relation type the URLs are printed for.
 * @return array Difference betwen the two arrays.
 */
function disable_emojis_remove_dns_prefetch( $urls, $relation_type ) {
 if ( 'dns-prefetch' == $relation_type ) {
 /** This filter is documented in wp-includes/formatting.php */
 $emoji_svg_url = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' );

$urls = array_diff( $urls, array( $emoji_svg_url ) );
 }

return $urls;
}

Quindi, scorrere fino alla sezione ‘Inserimento’ e selezionare la modalità ‘Inserimento automatico’.

Il codice verrà ora eseguito automaticamente sul vostro sito al momento dell’attivazione.

Choose an insertion method

Dopodiché, tornate in alto e spostate l’interruttore a destra da “Inattivo” ad “Attivo”.

Infine, fare clic sul pulsante “Salva snippet” per memorizzare le modifiche.

Click the Save Snippet button to save changes

Questo è tutto, avete disabilitato con successo le emoji in WordPress.

Metodo 2. Disabilitare le Emoji in WordPress utilizzando un plugin

Se non volete aggiungere codice al vostro sito web, questo metodo fa per voi.

Per prima cosa, è necessario installare e attivare il plugin Disable Emojis. Per ulteriori istruzioni, consultare la nostra guida su come installare un plugin di WordPress .

Il plugin funziona subito e non ci sono impostazioni da configurare.

Dopo l’attivazione, disattiverà automaticamente il supporto per le emoji dal vostro sito WordPress, migliorando la velocità di caricamento delle pagine.

Bonus: Aggiungere pulsanti di reazione ai vostri post su WordPress

Anche dopo aver disabilitato il supporto alle emoji, potreste voler permettere agli utenti di reagire ai vostri post e condividere le loro opinioni attraverso i pulsanti di reazione.

Questi pulsanti possono aumentare il coinvolgimento sul vostro blog WordPress e incrementare l’interazione con gli utenti.

Per farlo, è necessario installare e attivare il plugin WP Reactions Lite. Per maggiori dettagli, consultate la nostra guida per principianti su come installare un plugin di WordPress.

Dopo l’attivazione, visitate la pagina WP Reactions ” Global Activation dalla dashboard di WordPress e spostate l’interruttore Reactions su ON.

Toggle the Reactions Switch to the ON Position

Dopodiché, è possibile fare clic sul pulsante “Personalizza” e scegliere le diverse serie di emoji che si desidera aggiungere ai pulsanti di reazione.

È quindi possibile configurare le opzioni di posizionamento, le dimensioni e le CTA con il plugin.

Set Up Your Reaction Buttons

Una volta terminato, è sufficiente fare clic sul pulsante “Salva ed esci” per memorizzare le impostazioni.

Ora, visitate il vostro sito WordPress per vedere i pulsanti di reazione in azione. Per ulteriori informazioni, consultate il nostro tutorial su come aggiungere pulsanti di reazione a WordPress per aumentare il coinvolgimento.

WordPress Reaction Buttons Preview

Speriamo che questo articolo vi abbia aiutato a capire come disabilitare le Emoji sul vostro sito WordPress. Potreste anche dare un’occhiata alla nostra guida passo-passo su come creare un feed Facebook personalizzato in WordPress e al nostro articolo su come aggiungere notifiche web push al vostro sito WordPress.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

30 commentiLascia una risposta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    I would like to ask. Does banning emoji really have any significant effect on increasing website speed? I’m working on speed for one site, but the requirement was to keep the emoji on. Is it actually worth turning off emoji?

    • WPBeginner Support says

      It would not be a major performance increase, it would mainly affect speed for sites looking to maximize the improvements possible for as short of a load time as possible.

      Admin

      • Jiří Vaněk says

        Thanks for the reply, that’s what we were looking for. Get the highest possible speed results from the site. We will turn off the emoji and measure. Anyway, thanks for the advice.

  3. Jiří Vaněk says

    At first, I tended to disable emojis on my website. Since I’ve been using AIO SEO, I actually use emojis in SEO because it’s interesting to see how a title in SERP can grab more attention at first glance with emojis. I recommend trying emojis this way. You can actually impact organic traffic quite interestingly.

  4. Ivan Culic says

    Removing emojis served by WordPress is a sound decision performance wise. However, if you want to get rid of all emojis due to design inconsistencies, using the plugin discussed or extending your functions-file is just part of the equation. People will still be able to use Emoji characters. Whether these are displayed properly depends on native support. The only solution is to use a regular expression matching the Unicode emoji list and then replace them with your own for a unified look (isn’t WordPress trying to do that?) or remove them from the string altogether. Emojis have changed the way we communicate, love them ❤️ or hate them

  5. mayasl says

    I would say find some codes to remove the emoji, rather than installing another plugin which is another load.

  6. Harshadewa says

    Not sure if Mark missed few parts in that code. This code worked for me (there are two additional lines). You should add it to your “theme” functions.php

    // REMOVE WP EMOJI
    remove_action(‘wp_head’, ‘print_emoji_detection_script’, 7);
    remove_action(‘wp_print_styles’, ‘print_emoji_styles’);

    remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ );
    remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ );

    Thanks

  7. Serge says

    I Have customers complaining about emoji icons showing instead of navigation buttons. It happens when they view pictures using a light-box.

  8. Therese says

    I was experiencing slow admin panel loading times with 4.2 update. Installed this and it went away! Yay! How frustrating!

  9. Mikael Andersen says

    Thank you

    I have not even thought that it could slow down websites in WordPress.

    A question to the above discussion. Does the plugin just contain the code suggested from Mark, and nothing else.

  10. Joel Libava says

    Thanks for that info…I have to tell you though, the biggest issue with latest wp is the anchor text link editor. What did the developers do? And, why?

    The Franchise King®

    • WPBeginner Support says

      We agree that it was a surprising change that has had many publishers worried. There are plugins in work to resolve this issue. However, core is not going to go back to link title.

      Admin

  11. Mark says

    Isn’t it best to disable it by adding the following to functions.php rather than having yet another plugin:

    remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 );
    remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ );

  12. Chad Williams says

    So to disable emojis you suggest installing a plugin that adds back an additional file to do so? I’m sure there’s a better way to do this via functions.php.

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.