Title: Custom Post Type Images
Author: yonisink
Published: <strong>2011 年 12 月 21 日</strong>
Last modified: 2012 年 1 月 18 日

---

搜索插件

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

![](https://s.w.org/plugins/geopattern-icon/custom-post-types-image.svg)

# Custom Post Type Images

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

[下载](https://downloads.wordpress.org/plugin/custom-post-types-image.0.6.zip)

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

 [支持](https://wordpress.org/support/plugin/custom-post-types-image/)

## 描述

Custom Post Type Images makes it easy to attach an image to any custom post type,
which you can then call as necessary in the archive page for that post type OR in
the single itself, depending on how you use the plugin. Think of it as a featured
image for your post types, which you can use on overview or other pages.

## 屏幕截图

[⌊cptImages options page.⌉⌊cptImages options page.⌉[

cptImages options page.

## 安装

 1. Upload `cptImages` directory to your `/wp-content/plugins/` directory
 2. Activate the Custom Post Type Images plugin through the ‘Plugins’ page in WordPress
 3. Go to Tools > Manage Custom Post Type Images.
 4. To use, select an image for the custom post type and attach. You can then use the
    image in various ways:

As a shortcode. Put [cptImage] wherever you want the image to appear. Not that in
this usage (without a parameter) it will only appear when you are on a single item
of that custom post type OR in the archive page itself. To call any attached image,
use [cptImage cpt=”Custom Post Type Name”].

In PHP in your template. To retrieve the image url to a variable, use get_cptimage_image(
$optionalname, $echo) (you can use get_cptimage_image(“Custom Post Type Name”) to
retrieve a specific post type image, or get_cptimage_image(“Custom Post Type Name”,
true) to echo the url rather than retrieving it. To merely display the image, call
cptimage_image(“Custom Post type Name”) or simply cptimage_image(). Not that if 
you do not pass a post type name it will only appear when you are on a single item
of that custom post type OR in the archive page itself.

Please note, as with every plugin or theme modification, you should do a backup 
of your files beforehand. Although we’ve tested this across many installs, we are
not responsible for anything it does to your system and do not guarantee support.

## 常见问题

  None so far

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

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

[帮助将「Custom Post Type Images」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/custom-post-types-image)

### 对开发感兴趣吗?

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

## 更新日志

#### 0.5

## 额外信息

 *  版本 **0.5**
 *  最后更新：**15 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3 或更高版本 **
 *  已测试的最高版本为 **3.3.2**
 *  语言
 * [English (US)](https://wordpress.org/plugins/custom-post-types-image/)
 * 标签
 * [custom post type](https://cn.wordpress.org/plugins/tags/custom-post-type/)[custom post type archives](https://cn.wordpress.org/plugins/tags/custom-post-type-archives/)
   [image attachments](https://cn.wordpress.org/plugins/tags/image-attachments/)
 *  [高级视图](https://cn.wordpress.org/plugins/custom-post-types-image/advanced/)

## 评级

尚未提交反馈。

[您的评价](https://wordpress.org/support/plugin/custom-post-types-image/reviews/#new-post)

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

## 贡献者

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

## 支持

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

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

## 捐助

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

 [ 捐助此插件 ](http://shop.social-ink.net)