Title: Feed Post Thumbnail
Author: required
Published: <strong>2015 年 4 月 27 日</strong>
Last modified: 2024 年 11 月 18 日

---

搜索插件

![](https://ps.w.org/wp-feed-post-thumbnail/assets/banner-772x250.png?rev=1582767)

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

![](https://ps.w.org/wp-feed-post-thumbnail/assets/icon.svg?rev=2887120)

# Feed Post Thumbnail

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

[下载](https://downloads.wordpress.org/plugin/wp-feed-post-thumbnail.3.0.0.zip)

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

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

## 描述

With this plugin, an MRSS namespace is added to the site’s RSS feed to include each
post’s thumbnail.

WP Feed Post Thumbnail is very lightweight and only adds two small options under
Settings -> Reading.

### Contribute

If you would like to contribute to this plugin, report an issue or anything like
that, please note that we develop this plugin on [GitHub](https://github.com/wearerequired/required-wp-feed-post-thumbnail).

Developed by [required](https://required.com/)

## 屏幕截图

 * [[
 * Reading Settings

## 安装

### Manual Installation

 1. Upload the entire `/wp-feed-post-thumbnail` directory to the `/wp-content/plugins/`
    directory.
 2. Activate WP Feed Post Thumbnail through the ‘Plugins’ menu in WordPress.
 3. Enjoy more awesome RSS feeds

## 常见问题

### Does the RSS feed still validate with this plugin enabled?

Yep, we add the proper XML namespaces for that. Everything just works as expected!

### Any way to force the plugin to always add a certain thumbnail size?

Yes, the plugin has two filters available for this:

    ```
    // Filters the size on media:content tag. Defaults to 'full'.
    add_filter( 'wp_feed_post_thumbnail_image_size_full', function( $size ) {
        return 'large'; // Return any registered image size.
    }, 10, 1 );

    // Filters the size on the media:thumbnail tag. Defaults to 'thumbnail'.
    add_filter( 'wp_feed_post_thumbnail_image_size_thumbnail', function( $size ) {
        return 'medium'; // Return any registered image size.
    }, 10, 1 );
    ```

### Can I change which images are shown?

Yes, the plugin has two filters available for this:

    ```
    // Filters the featured image attachment post object.
    add_filter( 'wp_feed_post_thumbnail_image', function( $thumbnail ) {
        return ''; // Return an empty string or another attachment post object.
    }, 10, 1 );

    // Filters the array of attachment post objects. Defaults to featured image post object if exists.
    add_filter( 'wp_feed_post_thumbnail_images', function( $images ) {
        $attachment_id = '123';
        $images[] =  get_post( $attachment_id ); // Additional attachment post object.
        return images;
    }, 10, 1 );
    ```

### Can I change the title, description or author shown with the image?

Yes, there is a filter for each of these things:

    ```
    // Filters the title on the media:title tag. Defaults to attachment title.
    add_filter( 'wp_feed_post_thumbnail_title', function( $title ) {
        return 'Override title'; // Return any plain text.
    }, 10, 1 );

    // Filters the text on the media:description tag. Defaults to attachment description.
    add_filter( 'wp_feed_post_thumbnail_description', function( $description ) {
        return 'Same description for all images'; // Return any plain string.
    }, 10, 1 );

    // Filters the name of the author on the media:copyright tag. Defaults to attachment author.
    add_filter( 'wp_feed_post_thumbnail_author', function( $author_name ) {
        return 'Matt'; // Return any plain string.
    }, 10, 1 );
    ```

## 评价

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

### 󠀁[Not adding anything…](https://wordpress.org/support/topic/not-adding-anything/)󠁿

 [Clicknathan](https://profiles.wordpress.org/clicknathan/) 2016 年 10 月 27 日 
5 回复

Tried refreshing permalinks, saving settings on the General settings page you’ve
added the two checkboxes to, nothing makes a difference. No post thumbnail in the
feeds… Update! And then it started working! I’m guessing this may have had something
to do with either my hosting’s caching or possibly even just my own browser cache.
Works like a dream, thank you!

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/wp-feed-post-thumbnail/reviews/)

## 贡献者及开发者

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

贡献者

 *   [ required ](https://profiles.wordpress.org/wearerequired/)
 *   [ Silvan Hagen ](https://profiles.wordpress.org/neverything/)
 *   [ Pascal Birchler ](https://profiles.wordpress.org/swissspidy/)
 *   [ Ulrich ](https://profiles.wordpress.org/grapplerulrich/)

「Feed Post Thumbnail」插件已被翻译至 4 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/wp-feed-post-thumbnail/contributors)
为本插件所做的贡献。

[帮助将「Feed Post Thumbnail」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-feed-post-thumbnail)

### 对开发感兴趣吗?

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

## 更新日志

### 3.0.0 -2023-03-27

 * Enhancement: Add setting to disable adding Media RSS namespace.
 * Fixed: Prevent errors when unchecking all settings.
 * Changed: Requires at least PHP 7.4 and WordPress 6.0.

### 2.1.2 – 2019-03-11

 * Enhancement: Minor code improvements.
 * Enhancement: New filter `wp_feed_post_thumbnail_images` to list multiple images
 * Changed: minimum PHP version 5.4 & minimum WP version 4.7

For previous updates see [Changelog.md](https://github.com/wearerequired/wp-feed-post-thumbnail/blob/master/CHANGELOG.md).

## 额外信息

 *  版本 **3.0.0**
 *  最后更新：**2 年前**
 *  活跃安装数量 **2,000+**
 *  WordPress 版本 ** 6.0 或更高版本 **
 *  已测试的最高版本为 **6.7.5**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/wp-feed-post-thumbnail/) 、
   [English (US)](https://wordpress.org/plugins/wp-feed-post-thumbnail/) 、 [German](https://de.wordpress.org/plugins/wp-feed-post-thumbnail/)、
   [German (Switzerland)](https://de-ch.wordpress.org/plugins/wp-feed-post-thumbnail/)
   和 [Japanese](https://ja.wordpress.org/plugins/wp-feed-post-thumbnail/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/wp-feed-post-thumbnail)
 * 标签
 * [featured image](https://cn.wordpress.org/plugins/tags/featured-image/)[feed](https://cn.wordpress.org/plugins/tags/feed/)
   [mrss](https://cn.wordpress.org/plugins/tags/mrss/)[rss feed](https://cn.wordpress.org/plugins/tags/rss-feed/)
   [thumbnail](https://cn.wordpress.org/plugins/tags/thumbnail/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-feed-post-thumbnail/advanced/)

## 评级

 5 星（最高 5 星）。

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

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

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

## 贡献者

 *   [ required ](https://profiles.wordpress.org/wearerequired/)
 *   [ Silvan Hagen ](https://profiles.wordpress.org/neverything/)
 *   [ Pascal Birchler ](https://profiles.wordpress.org/swissspidy/)
 *   [ Ulrich ](https://profiles.wordpress.org/grapplerulrich/)

## 支持

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

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