Volete mostrare ai vostri visitatori gli ultimi articoli del blog che hanno visualizzato?
Molti siti di negozi online utilizzano i cookie per visualizzare gli elementi visualizzati di recente dagli utenti. Questo aiuta a mantenere l’interesse degli utenti e a costruire il riconoscimento del brand. Potete fare la stessa cosa con gli articoli del blog sul vostro sito WordPress.
In questo articolo vi mostreremo come visualizzare gli ultimi articoli visitati da un utente in WordPress.
Perché visualizzare gli articoli visitati per ultimi in WordPress?
I visitatori del vostro blog WordPress sono spesso alla ricerca dei vostri ultimi articoli. Facilitare la ricerca di contenuti freschi migliorerà l’esperienza dell’utente e aumenterà le visualizzazioni delle pagine. Per questo motivo, di solito consigliamo di visualizzare gli articoli recenti e quelli più popolari.
Tuttavia, a volte gli utenti possono tornare sul blog per rivedere un articolo che hanno già letto. Siti web come Amazon se ne rendono conto e mostrano ai visitatori gli elementi visualizzati di recente per aumentare le vendite e il coinvolgimento degli utenti.
Utilizzano i cookie per visualizzare gli elementi visualizzati di recente anche quando gli utenti non sono connessi.
Potete fare la stessa cosa sul vostro blog WordPress, aiutando i vostri visitatori return a continuare da dove hanno lasciato la loro ultima visita.
Vediamo come visualizzare un elenco personalizzato degli ultimi articoli visitati da un utente in WordPress.
Come visualizzare gli ultimi articoli visitati in WordPress
La prima cosa da fare è installare e attivare il plugin Last Viewed Posts. Per maggiori dettagli, consultate la nostra guida passo passo su come installare un plugin di WordPress.
Dopo aver attivato il plugin, andare su Aspetto ” Widget. Per aggiungere un nuovo widget, fate clic sull’icona più + in alto nello schermo e cercate nell’elenco “Ultimi articoli visualizzati”. Dopodiché, è sufficiente trascinare il widget ‘Last Viewed Posts Redo’ nella barra laterale.
Una volta fatto clic sul pulsante “Aggiorna” in alto nello schermo, è possibile visitare il sito web per vedere l’elenco degli articoli visitati per ultimi. Questi saranno visibili solo se sono stati visualizzati articoli sul blog dopo l’installazione del plugin.
Divulgazione dell’utilizzo di cookie da parte del plugin
Il plugin Last Viewed Posts non memorizza l’elenco degli articoli visti di recente da ciascun utente sul vostro sito web. L’elenco degli articoli viene invece salvato nel browser di ogni visitatore, in modo da non influire sulle prestazioni del sito web.
Poiché il plugin utilizza cookie, potrebbe essere necessario ottenere il consenso dell’utente per conformarsi al GDPR. Potete imparare a farlo seguendo la nostra guida su come aggiungere un popup per i cookie in WordPress per il GDPR/CCPA.
Se un utente decide di non consentire i cookie del blog, l’elenco degli articoli visitati per ultimi non verrà visualizzato.
Speriamo che questo tutorial vi abbia aiutato a imparare come visualizzare gli ultimi articoli visitati da un utente in WordPress. Potreste anche voler imparare a creare una newsletter via email nel modo giusto o dare un’occhiata alla nostra lista di plugin indispensabili per far crescere il vostro sito.
Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.
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!
Paolo says
Hi, just to be sure, by using cookies that means that if a user will change browser , he/she won’t be able to find the list of previously read posts, is that correct?
WPBeginner Support says
For the moment that is correct.
Admin
Suyash Ekhande says
Any new plugins to show recently viewed post in a carousel format?.
Jordan Smith says
Is this plugin still maintained? I’m looking for this exact functionality. Thanks!
Matthew Dalli says
Is there a way to do this to have it highlighted next to the post title rather than in a widget?
kalico says
This is a fantastic little gem. Is there a way to make this display other (custom) post types, or history across a multisite network?
Brian says
Is there a way to show the whole post (i.e. get_post) instead of just the title? Would you be able to provide the code and the location or where to place it in the plugin code? Thanks!
tony roberts says
I have installed the plugin but have trouble installing the widget. Go to Appearance > Widgets > Click on Last Viewed Posts> Click Primary Sidebar>Add Widget, nothing happens. If I drag and drop the Last Viewed Posts still nothing happens.
Any idea what I’m doing wrong?
Tony
RA says
Is there a shortcode for this plug in? I would like to insert this within a post.
WPBeginner Support says
No currently it does not have a shortcode. However, you can try our tutorial on how to add WordPress widgets in posts or page content.
Admin
frebro says
This works nicely on my localhost but throws a “Cannot modify header information – headers already sent” error on the production server. Seems like content has already begun to output when you set the cookie.
I’m using Roots theme and WordPress 3.6. Any suggestions on how to solve this?
musa garip says
Hi this plugin is great i have a questions
can you add a image ( featured image )
thanks
Editorial Staff says
Yes, but you would have to edit the plugin file.
Admin
David Rwell says
Thank you for this lovely little plug-in. It greatly adds to the personalization experience on a site.
David.
Jacopo Tarantino says
Is the plugin on github? I’d love to contribute.
Editorial Staff says
No it is not on Github yet. Please get in touch via the contact form, so we can communicate further
Admin
Jacopo Tarantino says
Wouldn’t it be better to use some kind of override in your own theme or plugin to change the value of those variables? If you edit the plugin directly, when you update the plugin(which you should always do!) you’ll lose those changes. It shouldn’t be too hard to hook in right after the plugin is activated and assign new values to what I’m assuming are global variables.
Editorial Staff says
Agreed. That is in the list of things to add to that plugin when we create a settings page
Admin