Title: Display Custom Fields
Author: TeaCii
Published: <strong>2014 年 5 月 17 日</strong>
Last modified: 2014 年 7 月 31 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/display-custom-fields.svg)

# Display Custom Fields

 由 [TeaCii](https://profiles.wordpress.org/teacii/) 開發

[下載](https://downloads.wordpress.org/plugin/display-custom-fields.1.1.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/display-custom-fields/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/display-custom-fields/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/display-custom-fields/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/display-custom-fields/#developers)

 [技術支援](https://wordpress.org/support/plugin/display-custom-fields/)

## 外掛說明

This plugin allows you to display the value of a custom field on a page or post.
Permitted values are raw text, html, javascript, javascript file url, css, css file.

Since version 1.1.x it also allows you to show a custom field of any page or post,
provided you have the id.

One of the intended use of this plugin is to provide just in time code without editing
the theme. Often code, especially css, gets lost with theme change. This techniques
will ensure the values are loaded only on the given page and they will survive changes
of themes and other plugins.

You can also use this to include javascript snippets or files. They will only be
loaded on the given post or page. This in turn allows for loading of scripts only
where needed.

You may use the plugin in two ways:
 [dcf field=”name_of_custom_field”] or optionally
you can – define the type of the field value. By default the type is “raw”. – provide
the id number of the page or post. By default, it would be the current page/post
id. [dcf field=”name_of_custom_field” type=”value_type” id=’post_or_page_id_number’]

The accepted value types are:

“raw” – this is the default and you do not need to specify this type. It outputs
the value as it is. You can use html code in the values quite safely.

“js” – use this to specify that the value is actually javascript. Do not wrap it
with the script tag. Remember that $ is not a valid jQuery replacement in WordPress.
You should use “jQuery” instead.

“jsf” – You may need to include a javascript file. The value of the custom field
should be a fully qualified javascript file url.

“css” – use this to specify css code in the value of the custom field.

“cssf” – You may need to include a css file. The value of the custom field should
be a fully qualified css file url. Here I would like to note that:
 – It is highly
unusual to include css files in the body. However, it does work. – There may be 
a side effect that some elements may not show properly until the css file is completely
loaded.

## 安裝方式

The installation has no special requirements. Proceed as normal.
 Upload the display-
custom-fields folder to the /wp-content/plugins/ directory Alternatively use the
upload plugin installable zip Activate the plugin through the \’Plugins\’ menu in
WordPress

There are no settings in the normal version.
 The pro version installs a additional
security configuration in the menu.

## 常見問題集

 1. What is the purpose of this plugin?
     The purpose is to display the values of the
    custom fields in a simple manner. Additionally, you can extend the feature of loading
    page/post specific css and javascript as code or file.
 2. What is special?
     It allows a unique way of loading css and javascript on the post/
    page. Normally this is loaded with the theme. This in turn means that the code 
    is loaded irrespective of whether it is needed or not. Since version 1.1.x it also
    allows you to show a custom field of any page or post, provided you have the id.
 3. Can I use code snippets from other sites?
     Yes. Just remember that you cannot mix
    js or css with raw/html type of vlaues.
 4. Do you provide support?
     Yes. On best effort basis free of charge.

## 使用者評論

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

### 󠀁[Better then others!..](https://wordpress.org/support/topic/better-then-others/)󠁿

 [vpsolatov](https://profiles.wordpress.org/vpsolatov/) 2016 年 9 月 3 日

‘Get Custom Field Values’ doesn’t work (may be only in my particular situation —
with Gantry 4 etc…)! 9000 installs fool my expectations… But! This plugin works 
in expected manner for build-in WP 4.4. custom fields and with ACF custom fields
too!

 [ 閱讀全部 1 則使用者評論 ](https://wordpress.org/support/plugin/display-custom-fields/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈Display Custom Fields〉的開發相關工作。

參與者

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

[將〈Display Custom Fields〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/display-custom-fields)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/display-custom-fields/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/display-custom-fields/)，或透過
[RSS](https://plugins.trac.wordpress.org/log/display-custom-fields/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/display-custom-fields/)。

## 變更記錄

1.1.1
 Allows you to show a custom field of any page or post, provided you have 
the id.

1.0.1
 The description has been updated

1.0.0
 Initial release

## 中繼資料

 *  版本 **1.1.1**
 *  最後更新 **12 年前**
 *  啟用安裝數 **20+**
 *  WordPress 版本需求 ** 3.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.9.40**
 *  語言
 * [English (US)](https://wordpress.org/plugins/display-custom-fields/)
 * 標籤:
 * [custom fields](https://tw.wordpress.org/plugins/tags/custom-fields/)[display meta](https://tw.wordpress.org/plugins/tags/display-meta/)
   [meta](https://tw.wordpress.org/plugins/tags/meta/)[meta fields](https://tw.wordpress.org/plugins/tags/meta-fields/)
 *  [進階檢視](https://tw.wordpress.org/plugins/display-custom-fields/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  1 個 5 星使用者評論     ](https://wordpress.org/support/plugin/display-custom-fields/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/display-custom-fields/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/display-custom-fields/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/display-custom-fields/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/display-custom-fields/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/display-custom-fields/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/display-custom-fields/reviews/)

## 參與者

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

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/display-custom-fields/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](http://TeaCii.com/donate)