Title: Post Type Icons
Author: Matthew Boynes
Published: <strong>2013 年 6 月 21 日</strong>
Last modified: 2014 年 4 月 25 日

---

搜索插件

![](https://ps.w.org/post-type-icons/assets/banner-772x250.png?rev=729426)

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

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

# Post Type Icons

 作者：[Matthew Boynes](https://profiles.wordpress.org/mboynes/)

[下载](https://downloads.wordpress.org/plugin/post-type-icons.0.2.2.zip)

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

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

## 描述

Does the pushpin not describe your custom post type? Here are hundreds more icons
to choose from. Icons are the GPL-compatible [Font Awesome Icons](http://fontawesome.io/).

This is the same icon features that comes with [SuperCPT](https://wordpress.org/plugins/super-cpt/)
0.2+, but pulled out of the plugin for those crazy birds who don’t use it.

This adds a function you can use, `pti_set_post_type_icon( $post_type, $icon );`
to set your post type’s icon. For instance, `pti_set_post_type_icon( 'event', 'calendar');`.
You can also set the global variable $pti_icons as an array of post type => icon
names. Using the global variable is safer, since it doesn’t rely on a function (
you could of course call `if ( function_exists( 'pti_set_post_type_icons' ) )` to
be equally safe using the function).

## 屏幕截图

[⌊An example of a couple of icons next to the "Post" icon in a normal state⌉⌊An 
example of a couple of icons next to the "Post" icon in a normal state⌉[

An example of a couple of icons next to the “Post” icon in a normal state

[⌊An example of a couple of icons next to the "Post" icon in a hover/active state⌉⌊
An example of a couple of icons next to the "Post" icon in a hover/active state⌉[

An example of a couple of icons next to the “Post” icon in a hover/active state

## 安装

 1. Upload to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Figure out which icon you want to use. Go to Tools → Post Type Icons page for a
    reference.
 4. In your theme or a plugin, set the icons in one of the following ways: a. Call 
    the function `pti_set_post_type_icon( $post_type, $icon_name );`, e.g. `pti_set_post_type_icon('
    event', 'calendar' );` b. Using the global variable `$pti_icons`, set the array
    key => value pair such that `'post_type' => 'icon-name'`, e.g. `$GLOBALS['pti_icons']['
    event'] = 'calendar';`

## 常见问题

  Do I have to write code/edit my theme to use this plugin?

For now, yes. The next version will come with a GUI.

  Does this do anything besides add icons?

Not at all! If you want more functionality, check out [SuperCPT](https://wordpress.org/plugins/super-cpt/),
which helps you create custom post types, custom taxonomies, and add meta boxes.

  I set my icons and they’re never going to change. Is there a way to remove the
plugin overhead and make it static?

Sure thing! The plugin pretty much just adds CSS to the admin which get added to
the document head. Move those to your theme/plugin (not your main style.css since
this is the admin panel, you’ll need an admin-only CSS file). You can leave the 
paths the same if you don’t plan on uninstalling the plugin (you can still deactivate
the plugin). If you want to uninstall it, you’ll have to copy the fonts to your 
theme/plugin and change the paths in the CSS.

  I don’t want my client seeing the Post Type Icons page in the admin, can I remove
it?

Yes. Add `add_filter( 'pti_plugin_show_admin_menu', '__return_false' );` in your
theme/plugin.

## 评价

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

### 󠀁[Excellent](https://wordpress.org/support/topic/excellent-4424/)󠁿

 [shaeirving1](https://profiles.wordpress.org/shaeirving1/) 2017 年 2 月 8 日

Excellent plugin, has helped our business in many ways

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

### 󠀁[Awesome Plugin](https://wordpress.org/support/topic/awesome-plugin-2470/)󠁿

 [dazunj](https://profiles.wordpress.org/dazunj/) 2017 年 2 月 7 日

I’m using MP6 in my admin pannel and I don’t like to use WP super CPT, I’ve been
looking for this type of plugin, this is great Work, Thank you

 [ 阅读所有5条评价 ](https://wordpress.org/support/plugin/post-type-icons/reviews/)

## 贡献者及开发者

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

贡献者

 *   [ Matthew Boynes ](https://profiles.wordpress.org/mboynes/)

[帮助将「Post Type Icons」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/post-type-icons)

### 对开发感兴趣吗?

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

## 更新日志

#### 0.2.2

 * Fixing issue with multiple post types

#### 0.2.1

 * Readme update

#### 0.2

 * FontAwesome 4.0.3 update
 * Fixed PHP 5.2 error

#### 0.1.1

Removed assets from trunk

## 额外信息

 *  版本 **0.2.2**
 *  最后更新：**12 年前**
 *  活跃安装数量 **100+**
 *  WordPress 版本 ** 3.6 或更高版本 **
 *  已测试的最高版本为 **3.9.40**
 *  语言
 * [English (US)](https://wordpress.org/plugins/post-type-icons/)
 * 标签
 * [custom post type](https://cn.wordpress.org/plugins/tags/custom-post-type/)[custom post types](https://cn.wordpress.org/plugins/tags/custom-post-types/)
   [Font Awesome](https://cn.wordpress.org/plugins/tags/font-awesome/)[icons](https://cn.wordpress.org/plugins/tags/icons/)
 *  [高级视图](https://cn.wordpress.org/plugins/post-type-icons/advanced/)

## 评级

 4.6 星（最高 5 星）。

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

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

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

## 贡献者

 *   [ Matthew Boynes ](https://profiles.wordpress.org/mboynes/)

## 支持

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

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

## 捐助

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

 [ 捐助此插件 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5ANKZEUN8MR7W)