Title: WP Random Post Thumbnails
Author: Brianna Deleasa
Published: <strong>2014 年 12 月 28 日</strong>
Last modified: 2025 年 7 月 27 日

---

搜索插件

![](https://ps.w.org/wp-random-post-thumbnails/assets/banner-772x250.jpg?rev=1541240)

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

![](https://ps.w.org/wp-random-post-thumbnails/assets/icon-256x256.png?rev=1541376)

# WP Random Post Thumbnails

 作者：[Brianna Deleasa](https://profiles.wordpress.org/bdeleasa/)

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

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

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

## 描述

This plugin allows you to upload a set of images via a settings page to be shown
for posts without images. The images will be chosen at random on page load for any
posts without a featured image (meaning each time the page is reloaded another random
image will be chosen). Useful if your theme shows thumbnails for the posts, and 
you don’t want any posts without thumbnails.

**UPDATE:** Now you can select images specifically for certain post types as well
as taxonomy terms.

## 安装

 1. Upload the `wp-random-thumbnails` folder to the `/wp-content/plugins/` directory.
 2. 通过WordPress的的“Plugins”菜单激活插件
 3. Configure the plugin by going to Settings > Random Thumbnails.
 4. That’s it! 🙂

## 常见问题

None yet!

## 评价

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

### 󠀁[Awesome random feature image](https://wordpress.org/support/topic/awesome-random-feature-image/)󠁿

 [ugotta](https://profiles.wordpress.org/ugotta/) 2021 年 4 月 27 日

Random Post feature image

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

### 󠀁[Good Plugins](https://wordpress.org/support/topic/good-plugins-59/)󠁿

 [andyhsia](https://profiles.wordpress.org/andyhsia/) 2020 年 6 月 19 日

it real help me

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

### 󠀁[Very nice and easy!](https://wordpress.org/support/topic/very-nice-and-easy-10/)󠁿

 [ranjbaran](https://profiles.wordpress.org/ranjbaran/) 2019 年 5 月 30 日

Thank you very very much for this! I have been searching for a plugin to show random
featured images for several hours and finally found this one!

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

### 󠀁[A Great Plugin](https://wordpress.org/support/topic/a-great-plugin-177/)󠁿

 [](https://profiles.wordpress.org/bluewildangel/) 2019 年 1 月 8 日 1 回复

Thanks, this is a great plugin and does what it says. Simple and effective!

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

### 󠀁[Very good!](https://wordpress.org/support/topic/very-good-2694/)󠁿

 [rfalcaoj](https://profiles.wordpress.org/rfalcaoj/) 2017 年 11 月 20 日 1 回复

This is exactly what I needed, I researched other plugins but they were too confusing.
This is simple and objective. Very good!

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

### 󠀁[PERFECT](https://wordpress.org/support/topic/perfect-2678/)󠁿

 [Nigal88](https://profiles.wordpress.org/nigal88/) 2016 年 9 月 3 日 1 回复

This is exactly what I needed, and from what I’ve seen there are no other plugins
like this which are updated and still functioning. Thank you very much for this 
and I hope you will continue updates if the functionality ever runs into any problems.

 [ 阅读所有8条评价 ](https://wordpress.org/support/plugin/wp-random-post-thumbnails/reviews/)

## 贡献者及开发者

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

贡献者

 *   [ Brianna Deleasa ](https://profiles.wordpress.org/bdeleasa/)

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

### 对开发感兴趣吗?

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

## 更新日志

#### 2.6.3

 * Patching a fatal error with `classes/class-wprpt.php` on sites running PHP7.

#### 2.6.2

 * Patching minor type error with $sizes in `add_image_attributes` in `classes/class-
   wprpt.php`.

#### 2.6.1

 * Minor adjustment to `classes/class-wprpt.php` to fix a potential PHP error in
   PHP7.

#### 2.6.0

 * Checked compatability with WordPress 6.7.
 * Removing a custom filter which was designed to add in a `post_thumbnail_id` filter.
   WordPress core now has the `post_thumbnail_id` filter, so our custom filter is
   no longer needed.
 * Added support for a class added to the images (when they are a random image).
   Use the `wprpt_random_post_image_class` filter to change the class name if needed.

#### 2.5.0

 * Updating CMB2 to the latest version to fix some PHP7 issues.

#### 2.4.0

 * Adding a new setting allowing users to exclude terms from having their posts 
   utilize random thumbnails

#### 2.3.0

 * Changing the doing_ajax constant to the new WordPress function.
 * Fixing a php foreach loop warning in template-tags.php

#### 2.2.2

 * Making sure to add the front end filters when performing Ajax requests.

#### 2.2.1

 * Fixing a minor PHP notice.

#### 2.2.0

 * Updating CMB2 to the latest version.
 * Fixing an issue in the newer CMB2 versions where the metabox tabs were being 
   added as top level menu pages.
 * Outputting CSS on our custom admin page to override some CMB2 styles in the metabox
   tabs.
 * Updating the plugin description in an effort to make it clearer as to what exactly
   the plugin does.
 * Verifying that the plugin works in WordPress 4.8.2.

#### 2.1.6

 * Verifying that the plugin works in WordPress 4.8.1.

#### 2.1.5

 * Fixing an issue with the version number not being updated.

#### 2.1.4

 * Fixing a PHP error on activation in PHP 7.

#### 2.1.3

 * Fixing a minor PHP warning with WP_DEBUG on.

#### 2.1.2

 * Testing to make sure the plugin works in WordPress 4.7.

#### 2.1.1

 * Fixing a minor PHP notice with WP_DEBUG on.

#### 2.1.0

 * Fixing an issue with terms in other languages not saving properly in the options
   page.

#### 2.0.8

 * Fixing another minor PHP warning.

#### 2.0.7

 * Fixing minor PHP warning when no images are selected.

#### 2.0.6

 * Checking whether the term is set before comparing it’s value (fixes a PHP notice).

#### 2.0.5

 * Fixing a minor PHP warning.

#### 2.0.4

 * Fixing a minor PHP warning.

#### 2.0.3

 * Adding a ‘Settings’ link into the plugin action links.

#### 2.0.2

 * Fixing issue with $this not being allowed in anonymous functions on older PHP
   versions.

#### 2.0.1

 * Removing the old cmb folder that somehow didn’t get removed during the 2.0.0 
   update.

#### 2.0.0

 * Adding support for specifying images for any taxonomy terms.
 * Adding support for specifying images specific to post types.
 * Code cleanup.
 * Updating the options page to make it more organized by using tabs and metaboxes.

#### 1.3.3.1

 * Updating some comments and code spacing. No functionality changes.

#### 1.3.3

 * Updating the tested up to version.
 * Adding a donate link in case anyone would like to be so kind as to donate. 🙂

#### 1.3.1

 * Updating some comments and spacing. No actual functionality changes.

#### 1.3.0

 * Fixing PHP warnings that occurred when installing the plugin and not configuring
   any settings.
 * Moving the CMB script inclusion to the main plugin file.

#### 1.2.1

 * Fixing an issue when a user doesn’t upload any images through the settings page.

#### 1.2.0

 * Fixing a fatal error on the options page.
 * Removing an unncecessary tag directory.

#### 1.0.0

Initial release.

## 额外信息

 *  版本 **2.6.3**
 *  最后更新：**11 月前**
 *  活跃安装数量 **1,000+**
 *  WordPress 版本 ** 3.5 或更高版本 **
 *  已测试的最高版本为 **6.7.5**
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-random-post-thumbnails/)
 * 标签
 * [post thumbnails](https://cn.wordpress.org/plugins/tags/post-thumbnails/)[random images](https://cn.wordpress.org/plugins/tags/random-images/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-random-post-thumbnails/advanced/)

## 评级

 5 星（最高 5 星）。

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

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

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

## 贡献者

 *   [ Brianna Deleasa ](https://profiles.wordpress.org/bdeleasa/)

## 支持

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

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

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=9AJYKL3BHB6RS&lc=US&item_name=WP%20Random%20Post%20Thumbnails%20Wordpress%20Plugin&item_number=WPRPT&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest)