Title: Last Viewed Posts by WPBeginner
Author: jottlieb
Published: <strong>2007 年 12 月 19 日</strong>
Last modified: 2024 年 12 月 9 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

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

# Last Viewed Posts by WPBeginner

 作者：[jottlieb](https://profiles.wordpress.org/jottlieb/)

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

 * [详情](https://cn.wordpress.org/plugins/last-viewed-posts/#description)
 * [评价](https://cn.wordpress.org/plugins/last-viewed-posts/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/last-viewed-posts/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/last-viewed-posts/#developers)

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

## 描述

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/).

## 安装

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; ?>
    ```

## 评价

![](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/) 2025 年 1 月 4 日

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/) 2020 年 1 月 2 日

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.

 [ 阅读所有3条评价 ](https://wordpress.org/support/plugin/last-viewed-posts/reviews/)

## 贡献者及开发者

「Last Viewed Posts by WPBeginner」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ 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」插件已被翻译至 1 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/last-viewed-posts/contributors)
为本插件所做的贡献。

[帮助将「Last Viewed Posts by WPBeginner」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/last-viewed-posts)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/last-viewed-posts/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/last-viewed-posts/)，或通过[RSS](https://plugins.trac.wordpress.org/log/last-viewed-posts/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/last-viewed-posts/)。

## 更新日志

#### 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.

## 额外信息

 *  版本 **1.0.2**
 *  最后更新：**1 年前**
 *  活跃安装数量 **500+**
 *  WordPress 版本 ** 4.9 或更高版本 **
 *  已测试的最高版本为 **6.7.5**
 *  PHP 版本 ** 5.6 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/last-viewed-posts/) 和 [Russian](https://ru.wordpress.org/plugins/last-viewed-posts/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/last-viewed-posts)
 * 标签
 * [recently viewed posts](https://cn.wordpress.org/plugins/tags/recently-viewed-posts/)
 *  [高级视图](https://cn.wordpress.org/plugins/last-viewed-posts/advanced/)

## 评级

 2.3 星（最高 5 星）。

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

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

[查看全部评论](https://wordpress.org/support/plugin/last-viewed-posts/reviews/)

## 贡献者

 *   [ 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_/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/last-viewed-posts/)