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 impaginare i commenti 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 suddividere i commenti sul vostro sito in più pagine?

Se il vostro sito riceve molti commenti, è segno che gli utenti sono coinvolti nei vostri contenuti. Tuttavia, mostrare tutti questi commenti in un’unica pagina può rallentare il vostro sito WordPress. È qui che la paginazione può essere d’aiuto.

In questo articolo vi mostreremo come velocizzare i tempi di caricamento dei post paginando i commenti in WordPress.

Paginate comments in WordPress

Perché si dovrebbero impaginare i commenti in WordPress?

Avete notato che i post del blog con molti commenti richiedono più tempo per essere caricati? La visualizzazione di un gran numero di commenti su una singola pagina mette sotto pressione il vostro server di hosting WordPress.

Questo può esaurire la memoria del server e far sì che i visitatori vedano la schermata bianca della morte.

I motori di ricerca come Google utilizzano la velocità e le prestazioni di WordPress come fattori di ranking. Ciò significa che un numero elevato di commenti può essere una cattiva notizia per la SEO di WordPress.

Inoltre, i commenti aggiungono molto contenuto ai vostri post, ma non sempre includono la vostra parola chiave target. Questo influisce sul rapporto parole chiave/contenuto e può impedire ai motori di ricerca di indicizzare il post per le parole chiave giuste.

Tenendo presente questo, vediamo come impaginare la sezione dei commenti in WordPress.

Suddivisione della sezione commenti di WordPress in pagine

La prima cosa da fare è accedere all’area di amministrazione di WordPress e andare alla pagina Impostazioni ” Discussioni.

Changing your WordPress discussion settings

Qui, trovare “Suddividi i commenti in pagine” e selezionare la casella accanto.

È ora possibile digitare il numero di commenti che si desidera visualizzare su ciascuna pagina del blog WordPress.

Adding comment pagination to your WordPress website

È inoltre possibile modificare la visualizzazione della pagina dei commenti più vecchia o più recente utilizzando il menu a tendina “prima/ultima pagina visualizzata per impostazione predefinita”.

Successivamente, è possibile modificare se ogni pagina mostrerà prima i commenti più vecchi o quelli più recenti, utilizzando il menu a tendina “I commenti devono essere visualizzati con….”.

Quando si è soddisfatti dell’impostazione della paginazione, basta scorrere fino alla fine della schermata e fare clic su “Salva modifiche”.

Clicking the 'Save Changes' button on the WordPress Discussion settings page

Ecco fatto!

Ora, se si visita un post con molti commenti, si dovrebbe vedere la paginazione in azione.

WordPress Comments Pagination in WPBeginner

Proprio come i commenti, è possibile impaginare i post di WordPress in più pagine. Potete approfondire questo argomento nel nostro articolo su come suddividere i post di WordPress in più pagine.

Suggerimento bonus: Ottimizzare la paginazione dei commenti su WordPress

La paginazione dei commenti di WordPress può aiutare a prevenire problemi di prestazioni nel vostro sito web. Tuttavia, se non viene utilizzata correttamente, può anche creare contenuti duplicati. Questo può far apparire il vostro sito come un sito di spam e confondere i motori di ricerca.

La buona notizia è che potete risolvere facilmente questo problema utilizzando All in One SEO (AIOSEO). È il miglior plugin SEO per WordPress che consente di ottimizzare facilmente il vostro sito per i motori di ricerca, anche se non avete esperienza di SEO.

All in One SEO website

Per impostazione predefinita, AIOSEO aggiunge automaticamente un numero di pagina al titolo SEO dei contenuti paginati.

In questo modo i motori di ricerca capiranno che la sezione dei commenti è stata distribuita su più pagine e non è un duplicato di una singola pagina.

The AIOSEO settings page

Per assicurarsi che i motori di ricerca sappiano qual è la pagina più importante, AIOSEO rimuove questi numeri di pagina dagli URL delle pagine dei commenti.

In altre parole, se avete suddiviso i vostri commenti in più pagine, AIOSEO aiuta i motori di ricerca a sapere qual è la pagina principale che gli utenti dovrebbero vedere per prima. Questo avviene attivando automaticamente l’impostazione “No Pagination for Canonical URLs”.

AIOSEO's no pagination for canonical URLs setting

Per aiutarvi a iniziare con AIOSEO, consultate la nostra guida su come configurare AIOSEO per WordPress.

Speriamo che questo tutorial vi abbia aiutato a paginare i commenti in WordPress. Potreste anche voler consultare la nostra guida su come combattere lo spam dei commenti in WordPress o il nostro elenco di plugin WordPress indispensabili per far crescere il vostro sito web.

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

15 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

    Thank you for the clarification regarding SEO optimization. It didn’t occur to me that a search engine could rate such content as duplicate. I have AIO SEO and have set it up according to your recommendation.

  3. Duncan Shaw says

    Hey, do you know if you can have comments paginate according to the date of the comments?

    Eg. Comments on page 3 for 28/07, Comments on page 2 for 29/07, Comments on page 1 for 30/07

    • WPBeginner Support says

      We do not have a recommended method at the moment for that and if you wanted users to have conversations it would normally be best not to separate comments by date.

      Admin

  4. Thien Nhan says

    Hi,

    I did follow these steps to split 20 comments per pages but the comment did not break into pages. It still showed all 30 comments in one page.

    Is there any idea why?

    Thank you.

    • WPBeginner Support says

      You would want to start by clearing your cache and if it’s not a caching issue you would likely need to check with your theme to ensure the theme you’re using does not try to override that setting.

      Admin

  5. brian says

    As far as I read and I understand paginate comments will create duplicate content.. So it’s not recommended at all to paginate comments.

    • WPBeginner Support says

      Most SEO plugins set up a canonical link on the paginated comment pages to point to the correct post for search engines.

      Admin

  6. Sonu says

    How can we show the new comment to user (which he just added) if we are using W3 total cache?
    The page is cached for 3 hours using browser Cache.

    Do you know of a plugin that probably uses wordpress JSON api to communicate and add comments to wp database.

    • WPBeginner Support says

      For the method the plugins use, you would want to reach out to the specific plugin. You may want to take a look at WP Rocket for what it sounds like you’re looking for.

      Admin

  7. Nick Corcodilos says

    This setting blew up my comments entirely once the number of comments got large — like over 100. It did not paginate — instead, it STOPPED DISPLAYING the first 100 comments altogether, with no option for the user to go to the page to view older comments. Suddenly, where I had 157 comments on a post (and it SAID 157 Comments up at the top), only 27 were showing. I turned this setting OFF altogether and all my comments came back.

    I’m using WordPress 4.4.2. This is a serious bug.

  8. TJ says

    One negative of WordPress split page comments is what happens when the comments-per-page tipping point is reached? The default, canonical page will end up showing just one comment.

    For instance, let’s say it’s set to show 10 comments per page and there are 21 comments. Well, the default, canonical page that 99.9% of folks visit will only show the 21st comment, while the previous page will hold the other 20. This can be confusing and looks bad. It would be preferable for the primary page to always show the maximum number of comments per page, but WordPress doesn’t make this possible without putting together a complicated class that extends the Walker_Comment class.

    • malcolm says

      I have this exact same problem and it’s very frustrating. Like you say, it makes the comments look ridiculous if a post says at the top it has 103 comments, but then the reader scrolls down and sees there are just 3.
      Does anyone know a way around this?

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.