Title: Last Viewed Posts by WPBeginner
Author: jottlieb
Published: <strong>Kevardhu 19, 2007</strong>
Last modified: Kevardhu 9, 2024

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/last-viewed-posts.svg)

# Last Viewed Posts by WPBeginner

 By [jottlieb](https://profiles.wordpress.org/jottlieb/)

[Download](https://downloads.wordpress.org/plugin/last-viewed-posts.1.0.2.zip)

 * [Details](https://cor.wordpress.org/plugins/last-viewed-posts/#description)
 * [Reviews](https://cor.wordpress.org/plugins/last-viewed-posts/#reviews)
 *  [Installation](https://cor.wordpress.org/plugins/last-viewed-posts/#installation)
 * [Development](https://cor.wordpress.org/plugins/last-viewed-posts/#developers)

 [Support](https://wordpress.org/support/plugin/last-viewed-posts/)

## Description

Installing this will allow you to use a widget or template tag to show your site’s
visitors a personalized list of posts and pages they have viewed.

The list of posts is saved in each visitor’s web browser, so even if you get millions
of visitors a month it won’t affect the performance of your website.

Note: It doesn’t store a global list of recently viewed posts by all users. Nothing
is stored in your site’s database. Every visitor has a custom lists of posts and
pages they have viewed.

If JavaScript is disabled or no single post has been clicked, no output will be 
displayed.

The plugin comes with a widget and a template tag.

This plugin has been adopted and maintained by [WPBeginner](http://www.wpbeginner.com)

#### What’s Next?

To learn more about WordPress, you can visit [WPBeginner](https://www.wpbeginner.com/)
for tutorials on topics like:

 * [WordPress Speed and Performance](http://www.wpbeginner.com/wordpress-performance-speed/)
 * [WordPress Security](http://www.wpbeginner.com/wordpress-security/)
 * [WordPress SEO](http://www.wpbeginner.com/wordpress-seo/)

…and many more [WordPress tutorials](http://www.wpbeginner.com/category/wp-tutorials/).

If you like our Last Viewed Posts plugin, then consider checking out our other projects:

 * [OptinMonster](https://optinmonster.com/) – Get More Email Subscribers with the
   most popular conversion optimization plugin for WordPress.
 * [WPForms](https://wpforms.com/) – #1 drag & drop online form builder for WordPress(
   trusted by 4 million sites).
 * [MonsterInsights](https://www.monsterinsights.com/) – See the Stats that Matter
   and Grow Your Business with Confidence. Best Google Analytics Plugin for WordPress.
 * [SeedProd](https://www.seedprod.com/) – Create beautiful landing pages with our
   powerful drag & drop landing page builder.
 * [WP Mail SMTP](https://wpmailsmtp.com/) – Improve email deliverability for your
   contact form with the most popular SMTP plugin for WordPress.
 * [RafflePress](https://rafflepress.com/) – Best WordPress giveaway and contest
   plugin to grow traffic and social followers.
 * [Smash Balloon](https://www.smashballoon.com/) – #1 social feeds plugin for WordPress–
   display social media content in WordPress without code.
 * [AIOSEO](https://aioseo.com/) – the original WordPress SEO plugin to help you
   rank higher in search results (trusted by over 2 million sites).
 * [PushEngage](https://www.pushengage.com/) – Connect with visitors after they 
   leave your website with the leading web push notification plugin.
 * [TrustPulse](https://trustpulse.com/) – Add real-time social proof notifications
   to boost your store conversions by up to 15%.

Visit [WPBeginner](http://www.wpbeginner.com/) to learn from our [WordPress Tutorials](http://www.wpbeginner.com/category/wp-tutorials/)
and find out about other [best WordPress plugins](http://www.wpbeginner.com/category/plugins/).

## Installation

Viewed posts are always tracked as long as the plugin is active and the visitor 
has enabled JavaScript and local storage.

 1. Install Last Viewed Posts by uploading the `last-viewed-posts` directory to the`/
    wp-content/plugins/` directory. (See instructions on [how to install a WordPress plugin](https://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/).)
 2. Activate Last Viewed Posts through the `Plugins` menu in WordPress.

To display the list, you can use the widget that comes with the plugin, or use the
following code and place it anywhere you want to outside the loop, e.g. sidebar.
php :

    ```
    <?php if (function_exists('zg_recently_viewed')): ?>
        <h2>Last viewed posts</h2>
        <?php zg_recently_viewed(); ?>
    <?php endif; ?>
    ```

## Reviews

![](https://secure.gravatar.com/avatar/a767e8a149cf911b94e5a80a140cc84b9c68b8430745dd22b6db57e8e3ba7c14?
s=60&d=retro&r=g)

### 󠀁[No settings whatsoever makes this useless unfortunately](https://wordpress.org/support/topic/no-settings-whatsoever-makes-this-useless-unfortunately/)󠁿

 [zonkeroo](https://profiles.wordpress.org/zonkeroo/) Mis-Genver 4, 2025

This appears to be the only widget to show an end user the last post they viewed.
My site is a WIKI type of site and users may get lost so this would be extremely
helpful.It works – BUT:You cannot adjust the large heading or indentation in the
sidebar – I can sort of live with that – BUT – Worst is you cannot set a post limit.
The list of last viewed posts goes on forever. It seems like such an obvious setting
to add, it boggles the mind that they left it out. Ruins the widget. Can’t live 
with this fail.

![](https://secure.gravatar.com/avatar/6748096252a4aafe3f38ecb5bd2d987759c693d4ba2e235431513e16a94e3037?
s=60&d=retro&r=g)

### 󠀁[Broken](https://wordpress.org/support/topic/broken-629/)󠁿

 [JJNW](https://profiles.wordpress.org/jjnw/) Mis-Genver 2, 2020

Several issues with this plugin. Great idea, but too many errors: preg_replace():
The /e modifier is no longer supported, use preg_replace_callback instead in last_viewed_posts.
php on line 64, or like Cannot modify header information – headers already sent 
by last_viewed_posts.php on line 87, etc.

 [ Read all 3 reviews ](https://wordpress.org/support/plugin/last-viewed-posts/reviews/)

## Contributors & Developers

“Last Viewed Posts by WPBeginner” is open source software. The following people 
have contributed to this plugin.

Contributors

 *   [ jottlieb ](https://profiles.wordpress.org/jottlieb/)
 *   [ Noumaan Yaqoob ](https://profiles.wordpress.org/noumaan/)
 *   [ Syed Balkhi ](https://profiles.wordpress.org/smub/)
 *   [ Andrei Surdu ](https://profiles.wordpress.org/_smartik_/)

“Last Viewed Posts by WPBeginner” has been translated into 1 locale. Thank you to
[the translators](https://translate.wordpress.org/projects/wp-plugins/last-viewed-posts/contributors)
for their contributions.

[Translate “Last Viewed Posts by WPBeginner” into your language.](https://translate.wordpress.org/projects/wp-plugins/last-viewed-posts)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/last-viewed-posts/),
check out the [SVN repository](https://plugins.svn.wordpress.org/last-viewed-posts/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/last-viewed-posts/)
by [RSS](https://plugins.trac.wordpress.org/log/last-viewed-posts/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.2

 * Remove the legacy cookie based code.
 * Test on WordPress 6.7.1.

#### 1.0.1

 * Fix for legacy widget settings.

#### 1.0.0

 * Complete rewrite to use JavaScript rather than cookies to store custom posts.
 * Updated list of supported WordPress versions.
 * Improved performance for sites with a large number of visitors.

#### 0.7.3

 * Updated Readme.txt.
 * Checked compatibility with WordPress 5.1.1.
 * Miscellaneous updates.

#### 0.7.2

 * Plugin maintenance update.

#### 0.7.1

 * Post/Page ID values in cookie are sanitized for output. Upgrade is recommend 
   for more security.

#### 0.7

 * Pages can now be recognized (optional).
 * Custom Loop is no longer used. Now we make a database query to get the post title.

## Meta

 *  Version **1.0.2**
 *  Last updated **1 year ago**
 *  Active installations **500+**
 *  WordPress version ** 4.9 or higher **
 *  Tested up to **6.7.5**
 *  PHP version ** 5.6 or higher **
 *  Languages
 * [English (US)](https://wordpress.org/plugins/last-viewed-posts/) and [Russian](https://ru.wordpress.org/plugins/last-viewed-posts/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/last-viewed-posts)
 * Tag
 * [recently viewed posts](https://cor.wordpress.org/plugins/tags/recently-viewed-posts/)
 *  [Advanced View](https://cor.wordpress.org/plugins/last-viewed-posts/advanced/)

## Ratings

 2.3 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/last-viewed-posts/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/last-viewed-posts/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/last-viewed-posts/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/last-viewed-posts/reviews/?filter=2)
 *  [  2 1-star reviews     ](https://wordpress.org/support/plugin/last-viewed-posts/reviews/?filter=1)

[Add my review](https://wordpress.org/support/plugin/last-viewed-posts/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/last-viewed-posts/reviews/)

## Contributors

 *   [ jottlieb ](https://profiles.wordpress.org/jottlieb/)
 *   [ Noumaan Yaqoob ](https://profiles.wordpress.org/noumaan/)
 *   [ Syed Balkhi ](https://profiles.wordpress.org/smub/)
 *   [ Andrei Surdu ](https://profiles.wordpress.org/_smartik_/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/last-viewed-posts/)