Title: Random Post Link
Author: scribu
Published: <strong>2009 年 11 月 4 日</strong>
Last modified: 2012 年 9 月 13 日

---

搜索插件

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

![](https://s.w.org/plugins/geopattern-icon/random-post-link.svg)

# Random Post Link

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

[下载](https://downloads.wordpress.org/plugin/random-post-link.zip)

 * [详情](https://cn.wordpress.org/plugins/random-post-link/#description)
 * [评价](https://cn.wordpress.org/plugins/random-post-link/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/random-post-link/#developers)

 [支持](https://wordpress.org/support/plugin/random-post-link/)

## 描述

Unlike the [Random Redirect](https://wordpress.org/extend/plugins/random-redirect/)
plugin, this plugin makes sure that a user will not see the same post twice.

It does this by storing a cookie containing a list of single posts that the user
has seen. It then checks that list before redirecting.

#### Usage

Just put this line anywhere in your theme where you want the link to appear.

    ```
    <?php random_post_link(); ?>
    ```

You can specify the text you want on the link like so:

    ```
    <?php random_post_link('Feeling lucky'); ?>
    ```

Links: [Plugin News](http://scribu.net/wordpress/random-post-link) | [Author’s Site](http://scribu.net)

## 常见问题

  “Parse error: syntax error, unexpected T_CLASS…” Help!

Make sure your host is running PHP 5. Add this line to wp-config.php to check:

    ```
    var_dump(PHP_VERSION);
    ```

  What happens when there are no more posts?

If a user has seen all the available posts, the plugin will clear the list and redirect
to a random post.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Random Post Link」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ scribu ](https://profiles.wordpress.org/scribu/)

[帮助将「Random Post Link」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/random-post-link)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0.1

 * handle case when a user has seen all posts

#### 1.0

 * initial release
 * [more info](http://scribu.net/wordpress/random-post-link/rpl-1-0.html)

## 额外信息

 *  版本 **1.0.1**
 *  最后更新：**14 年前**
 *  活跃安装数量 **50+**
 *  WordPress 版本 ** 2.8 或更高版本 **
 *  已测试的最高版本为 **3.0.5**
 *  语言
 * [English (US)](https://wordpress.org/plugins/random-post-link/)
 * 标签
 * [button](https://cn.wordpress.org/plugins/tags/button/)[redirect](https://cn.wordpress.org/plugins/tags/redirect/)
 *  [高级视图](https://cn.wordpress.org/plugins/random-post-link/advanced/)

## 评级

 2 星（最高 5 星）。

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

[Your review](https://wordpress.org/support/plugin/random-post-link/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/random-post-link/reviews/)

## 贡献者

 *   [ scribu ](https://profiles.wordpress.org/scribu/)

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/random-post-link/)