
Custom Field Template plugin [ English Here ]
Custom Field Template plugin (カスタムフィールドテンプレート)というプラグインはカスタムフィールドの入力を支援するプラグインだ。あらかじめカスタムフィールドのテンプレートを登録しておくことでキーをその都度入力することなく、テンプレートにある項目の値を入力していくだけでよくなる。このCustom Field Templateというプラグインは、WordPressのカスタムフィールドを多用し、決まったデータを入力し公開しているようなサイトでは便利になるはずだ。
特徴
Custom Field Template pluginは、Joshua Sigarさんが開発したrc:custom_field_guiというプラグインをベースに改良を加えたものである。rc:custom_field_guiからの変更点は以下のとおり。
- カスタムフィールドのテンプレートを登録し、投稿ページでテンプレートを切り替えられる。
- カスタムフィールドのテンプレートは設定ページで登録する。iniファイルは使用しない。
- 投稿だけでなくページでもカスタムフィールドを利用できる。
- textareaでのtinyMCEのサポート
必須条件
WordPress 2.1 以上 (WordPress 2.2.3以降でしか確認してない。)
リリースヒストリー
- 2010.02.07 Custom Field Template 1.5.7 リリース
- バグフィックス:strip slashes、Autho Hook of `the_content()`
- 2010.01.25 Custom Field Template 1.5.6 リリース
- バグフィックス:ページ編集画面でデフォルトのカスタムフィールドを禁止、WordPress 2.8以前のバージョンとの互換性
- 2010.01.13 Custom Field Template 1.5.5 リリース
- バグフィックス:画像アップロードの重複を避けるために、プレビューボタンを隠す
- 2010.01.06 Custom Field Template 1.5.4 リリース
- バグフィックス:id整備、検索関連
- 2009.12.11 Custom Field Template 1.5.3 リリース(svnでしくじって1.5.2がうまくいかなかった模様)
- バグフィックス:content中のバックスラッシュとcftsearchのORからANDへ
- 2009.12.04 Custom Field Template 1.5.1 リリース
- バグフィックス:バックスラッシュが保存されない
- 2009.12.03 Custom Field Template 1.5 リリース
- バグフィックス:fieldsetタイプ
- バグフィックス:保存ボタン
- 2009.11.19 Custom Field Template 1.4.9 リリース
- テンプレート、初期化ボタン、保存ボタンを無効にするオプション追加
- バグフィックス:enctypeがうまくセットされない
- ファイルが削除されてもmeta valuesが消えない
- 2009.10.29 Custom Field Template 1.4.8 リリース
- バグフィックス:fileタイプ
- 2009.10.29 Custom Field Template 1.4.7 リリース
- バグフィックス:save_postアクションの重複
- バグフィックス:fileタイプ
- 2009.10.28 Custom Field Template 1.4.6 リリース
- バグフィックス:チェックボックスのIDと保存
- 2009.10.26 Custom Field Template 1.4.5 リリース
- バグフィックス:cformsプラグインとの干渉
- バグフィックス:値が空の時、データを削除
- バグフィックス:チェックボックスのラベル最初のみに表示
- 2009.10.19 Custom Field Template 1.4.4 リリース
- バグフィックス:fileタイプ
- 2009.10.19 Custom Field Template 1.4.3 リリース
- バグフィックス:グループの追加ボタン、複数値の保存、クオテーションマーク
- 2009.10.15 Custom Field Template 1.4.2 リリース
- バグフィックス:検索まわり
- 2009.10.15 Custom Field Template 1.4 リリース
- ファイルアップロード機能の追加。(`type = file`)
- アップロードするファイルを投稿と関連付ける場合は、(`relation = true`)
- アップロードしたファイルのIDがメタ値として保存
- 複製オプションも利用可能(`multiple = true`, `multipleButton = true`)
- フィールドのグループ機能の追加。`type = fieldset_open` と `type = fieldset_close`でグループに含めたいフィールドを囲む。
- `fieldset_open`と`fieldset_close`のキーは統一する必要
- `multipleButton = true`を`fieldset_open`に指定可能。
- グループ内でのフィールドごとの`multiple = true`と`multipleButton = true`はうまく機能しない。
- グループ内でのtinyMCEは未対応
- ハンガリー語、ウズベキスタン語
- バグフィックス色々。テンプレートの解釈するコードの書き換えを行ったためバグがあるかも。
- 2009.08.31 Custom Field Template 1.3.8 リリース
- readOnly属性。(`readOnly = true`)
- Date Picker用`startDate` and `endDate`属性。(`startDate = '1970/01/01'` and `endDate = (new Date()).asString()`)
- `mediaOffImage`, `mediaOffVideo`, `mediaOffAudio`, and `mediaOffMedia`属性(`mediaOffImage = true`)
- 2009.07.28 Custom Field Template 1.3.7 リリース
- バグフィックス(class属性)
- ショートコードをカスタムフィールドでも使用できる属性(`shortCode = true`)
- 値がなかった場合の代替表示属性(`outputNone = No Data`)
- 値が一つでも`<ul><li>で表示(`singleList = true`)
- 編集リストページのカスタムフィールドを表示させないオプション
- 2009.07.23 Custom Field Template 1.3.6 リリース
- Changelog
- バグフィックス(checkboxのclass属性)
- 2009.07.05 Custom Field Template 1.3.5 リリース
- バグフィックス(the_excerptまわり)
- 2009.07.02 Custom Field Template 1.3.4 リリース
- バグフィックス(スタイルシート)
- 2009.06.30 Custom Field Template 1.3.3 リリース
- バグフィックス(抜粋のショートコード使用オプション)
- 2009.06.19 Custom Field Template 1.3.2 リリース
- バグフィックス(tinyMCE)
- 2009.06.18 Custom Field Template 1.3.1 リリース
- バグフィックス(テンプレートファイル読み込み、the_excerptまわり)
- 2009.06.10 Custom Field Template 1.3.0 リリース
- テンプレートファイルによる指定
- textタイプにDate Picker搭載。(`date = true`, `dateFirstDayOfWeek = 0`, `dateFormat = yyyy/mm/dd`)
- バグフィックス(検索まわり、post type)
- 2009.05.29 Custom Field Template 1.2.7 リリース
- テンプレートを使用するPost IDの指定
- バグフィックス(検索まわり、タグまわり)
- 2009.05.25 Custom Field Template 1.2.6 リリース
- バグフィックス(ビジュアルエディタ不使用時の画像挿入)
- 2009.05.17 Custom Field Template 1.2.5 リリース
- フランス語、ベラルーシ語
- 2009.05.11 Custom Field Template 1.2.4 リリース
- バグフィックス(tinyMCEの不具合)
- 2009.04.30 Custom Field Template 1.2.3 リリース
- バグフィックス(the_contentの不具合)
- 2009.04.22 Custom Field Template 1.2 リリース
- フィールド数を定めずに追加していける属性の追加。(`multiple = true`, `startNum = 5`, `endNum = 10`, `multipleButton = true`)
- バグフィックス(検索まわり)
- 2009.04.12 Custom Field Template 1.1.7 リリース
- maxlength属性の追加。(maxlength = 10)
- 2009.04.07 Custom Field Template 1.1.6 リリース
- オートフックをフィードにも適用
- 2009.04.06 Custom Field Template 1.1.5 リリース
- style属性の追加
- バグフィックス(出力まわり)
- 2009.04.06 Custom Field Template 1.1.4 リリース
- バグフィックス(保存まわり)
- 2009.03.31 Custom Field Template 1.1.3 リリース
- オプションのエクスポート、インポート
- before、after属性の追加
- バグフィックス(タグまわり)
- 2009.03.26 Custom Field Template 1.1.2 リリース
- バグフィックス(保存まわり)
- 2009.03.22 Custom Field Template 1.1.1 リリース
- 初期化ボタンの追加
- 投稿コンテンツ中へのオートフックコンテンツの中 ([cfthook hook=0])
- バグフィックス(カテゴリーまわり)
- 2009.03.12 Custom Field Template 1.1 リリース
- JavaScriptイベントハンドラ属性の追加。ex) onclick = alert('ok'); 対応イベントハンドラ: onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmouseup, onmouseover, onmouseout, onmousemove, onfocus, onblur, onchange, onselect
- バグフィックス(カテゴリ関連付け)
- 2009.03.08 Custom Field Template 1.0.8 リリース
- ショートコードをウィジェットで使用するオプションの追加。
- 2009.03.05 Custom Field Template 1.0.7 リリース
- 投稿タイプの追加。
- バリューカウントの追加
- 2009.02.26 Custom Field Template 1.0.6 リリース
- バグフィックス(JavaScript関連)
- 2009.02.14 Custom Field Template 1.0.5 リリース
- ボックスタイトルをテンプレートタイトルで置き換えるオプションの追加。
- バグフィックス(自動保存まわり)
- 2009.02.06 Custom Field Template 1.0.4 リリース
- クイック編集を使用しないオプションの追加
- textareaにHTML Editorの追加。 ex) htmlEditor = true
- イタリア語対応
- 2009.02.02 Custom Field Template 1.0.3 リリース
- デフォルトのカスタムフィールドを停止させるオプションの追加
- バグフィックス
- 2009.01.28 Custom Field Template 1.0.2 リリース
- バグフィックス
- 2009.01.27 Custom Field Template 1.0.1 リリース
- バグフィックス
- 2009.01.27 Custom Field Template 1.0 リリース
- 検索機能の追加。まだ開発中。ex) [cftsearch format=0]
- 表示時に処理を加えるoutputCodeと保存時に処理を加えるeditCodeの追加。ex) outputCode = 1 , editCode = 2
- 保存機能の追加。テンプレートやカテゴリー切替時の自動保存機能追加。
- classの追加。ex) class = text
- the_content()の自動フック機能追加。カテゴリーごとの自動表示を可能にする。
- トルコ語、ドイツ語対応
- バグフィックス
- 2009.01.16 Custom Field Template 0.9.2 リリース
- バグフィックス
- 2009.01.15 Custom Field Template 0.9.1 リリース
- バグフィックス
- 2009.01.15 Custom Field Template 0.9 リリース
- 並び替えオプションの追加。ex) sort = asc または sort = desc
- クイック編集のサポート(tinyMCEとmediaButtonは未対応)
- バグフィックス
- 2009.01.09 Custom Field Template 0.8 リリース
- valueLabelを追加。radio, checkbox, selectにおいて、実際にセットするvalueとは異なる値を表示する場合 ex) valueLabel = りんご
- 値が空白でもカスタムフィールドの値を保存するblankオプションの追加。ex) blank = true
- breakタイプの追加。カスタムフィールドテンプレートをdivで括る。スタイルシートでCSSを設定 ex) #cft div { width:50%; float:left; }
- [cft] Shortcodeフォーマットの追加。
- ロシア語対応
- バグフィックス
- 2008.12.22 Custom Field Template 0.7.4 リリース
- バグフィックス
- 2008.12.20 Custom Field Template 0.7.3 リリース
- スペイン語対応。
- バグフィックス
- 2008.12.13 Custom Field Template 0.7.2 リリース
- オリジナルのPHPコードに`checkbox`を追加。
- バグフィックス
- 2008.12.12 Custom Field Template 0.7.1 リリース
- テンプレートインストラクションの追加
- バグフィックス
- 2008.12.09 Custom Field Template 0.7 リリース
- カスタムフィールドの値を自動でタグに入力する ex) insertTag = true
- カスタムフィールドの値を投稿に表示するShortcode、[cft]の追加。 output = true が設定されば項目のみ表示。
- 2008.12.06 Custom Field Template 0.6.5 リリース
- ユーザーレベル属性の追加。ユーザーレベルに応じてカスタムフィールドを表示する。 ex) level = 2
- 2008.12.06 Custom Field Template 0.6.4 リリース
- `radio`と`select`で、オリジナルのPHPコードを実行して$valuesをセットするオプション(実験的) ex) code = 0
- 2008.11.23 Custom Field Template 0.6.3 リリース
- バグフィックス
- 2008.11.20 Custom Field Template 0.6.2 リリース
- バグフィックス
- 2008.11.18 Custom Field Template 0.6.1 リリース
- wpautop関数使用のオプション追加
- 2008.11.17 Custom Field Template 0.6 リリース
- typeにtextを追加。textとtextfieldは同じ。
- カスタムフィールドのキーをラベルで置き換えできるオプションの追加。
- バグフィックス
- 2008.11.13 Custom Field Template 0.5.3 リリース
- バグフィックス
- 2008.11.05 Custom Field Template 0.5.2 リリース
- バグフィックス
- 2008.11.05 Custom Field Template 0.5.1 リリース
- labelを追加
- スタイルシートの採用
- テンプレートが一つの時、セレクトボックスを表示しない
- 2008.11.05 Custom Field Template 0.5.0 リリース
- 設定ページにオプションリストを追加
- radioにclearButtonを追加
- textareaのサイズ保持
- WordPress 2.7の対応
- 2008.10.24 Custom Field Template 0.4.4 リリース
- 複数checkboxの指定方法の追加
- 2008.10.23 Custom Field Template 0.4.3 リリース
- バグフィックス
- 2008.10.22 Custom Field Template 0.4.2 リリース
- バグフィックス
- 2008.10.15 Custom Field Template 0.4.1 リリース
- バグフィックス
- 2008.10.15 Custom Field Template 0.4 リリース
- 同一名のキーを持つフィールドを作成可
- hideKeyオプションの追加。hideKey = true
- メディアボタンはデフォルトではfalse。有効にする場合は、mediaButton = tureを追加。
- 2008.10.08 Custom Field Template 0.3.2 リリース
- バグフィックス
- 2008.10.05 Custom Field Template 0.3.1 リリース
- メディアボタンのサポート
- 2008.09.05 Custom Field Template 0.2 リリース
- tinyMCEのサポート
- 2008.08.31 Custom Field Template 0.1.1 リリース
- バグフィックス
- 2008.08.30 Custom Field Template 0.1 リリース
- 初公開
ダウンロード
Custom Field Templateプラグインのダウンロードは下記のリンクをクリック
または
インストール
- Custom Field Templateをダウンロードし、圧縮ファイルを解凍後、custom-field-templateディレクトリをwp-content/pluginsディレクトリにアップロードする。
- WordPressのプラグインページでCustom Field Templateを有効化する。
- 管理メニューの設定にある、カスタムフィールドテンプレートにて、テンプレートを登録する。
寄付
プラグインがお気に召しましたら、よろしければ下記のPaypalリンクよりご寄付ください。よろしくお願いいたします。
使用方法
ここではテンプレートの設定方法を記す。基本的にrc:custom_field_guiのものと同じ。まずはサンプルを見てもらおう。
-
[Plan]
-
type = text
-
size = 35
-
label = Where are you going to go?
-
-
[Plan]
-
type = textfield
-
size = 35
-
hideKey = true
-
-
[Favorite Fruits]
-
type = checkbox
-
value = apple # orange # banana # grape
-
default = orange # grape
-
-
[Miles Walked]
-
type = radio
-
value = 0-9 # 10-19 # 20+
-
default = 10-19
-
clearButton = true
-
-
[Temper Level]
-
type = select
-
value = High # Medium # Low
-
default = Low
-
-
[Hidden Thought]
-
type = textarea
-
rows = 4
-
cols = 40
-
tinyMCE = true
-
mediaButton = true
まず、一つのセクションが一つのカスタムフィールドを指している。[]で囲まれているのがカスタムフィールドのキーである。typeには、textfield、checkbox、radio、select、textareaが指定できる。その他、size、value、default、rows、colsが適宜適用できるようになっている。とりあえず、色々試してみてほしい。
カスタムフィールドの入力は、投稿・ページの作成・編集時にテンプレートが表示されているはずなのでそこから行う。テンプレートはセレクトボックスで切り替えられるようになっている。
カスタムフィールドテンプレートのデザイン
デザインをCSSで変更できる(0.5.1より)。以下はデフォルトの設定。
-
#cft dl { clear:both; margin:0; padding:0; width:100%; }
-
#cft dt { float:left; font-weight:bold; margin:0; text-align:center; width:20%; }
-
#cft dt .hideKey { visibility:hidden; }
-
#cft dd { float:left; margin:0; text-align:left; width:80%; }
-
#cft dd p.label { font-weight:bold; margin:0; }
カスタムフィールドテンプレートを投稿に表示するショートコード
[cft]を投稿欄に入力するとカスタムフィールドの値をまとめて表示する(0.7より)。output = true を指定した項目のみ表示。設定できるオプションは以下のとおり。
post_id
カスタムフィールドが関連付けられているpost_idを指定する。デフォルトは現在の投稿のpost_id。
template
TEMPLATE ID。カスタムフィールドテンプレートのIDを指定する。デフォルトは0。
ex) [cft post_id=10 template=1]
[cft]ショートコードフォーマットを使用する場合
FORMAT IDが指定された場合のみ、ショートコードフォーマットが使用される。それ以外は通常表示。TEMPLATE IDは無視される。
format
FORMAT ID。ショートコードフォーマットのIDを指定する。デフォルトはなし。
ex) [cft format=0]
[cft] ショートコードフォーマットの例。[]の部分が置換されて表示されます。
-
<table class="cft">
-
<tbody>
-
<tr>
-
<th>Plan</th><td colspan="3">[Plan]</td>
-
</tr>
-
<tr>
-
<th>Favorite Fruits</th><td>[Favorite Fruits]</td>
-
<th>Miles Walked</th><td>[Miles Walked]</td>
-
</tr>
-
<tr>
-
<th>Temper Level</th><td colspan="3">[Temper Level]</td>
-
</tr>
-
<tr>
-
<th>Hidden Thought</th><td colspan="3">[Hidden Thought]</td>
-
</tr>
-
</tbody>
-
</table>
最後に
rc:custom_field_guiは古くからあるプラグインだが、すでに更新されておらず、もうひとつ使い勝手がよくなかった(設定を変更するのに一々iniファイルを編集する必要があった、など)。このプラグインを使用することで、データベース的に情報を整理するのにWordPressを利用している方の入力を少しでも楽にできればと思う。何か不具合とか、こういう機能を追加してほしい、というのがあればぜひ連絡してほしい。
Custom Filed Template Features

The Custom Field Template plugin adds the default custom fields on the Write Post/Page. The template format is almost same as the one of the rc:custom_field_gui plugin. The difference is following:
- You can set any number of the custom field templates and switch the templates when you write/edit the post/page.
- This plugin does not use the ini file for the template but set it in the option page of the plugin.
Requirement
WordPress 2.1 or higher
History
- 2010.02.07 Custom Field Template 1.5.7 Release
- Bugfix: strip slashes.
- Bugfix: misjudgment of Autho Hook of `the_content()`.
- 2010.01.25 Custom Field Template 1.5.6 Release
- Bugfix: disable the default custom fields in the page edit screen.
- Bugfix: compatible with old WordPress versions.
- 2010.01.13 Custom Field Template 1.5.5 Release
- Bugfix: hide the preview button in order to prevent duplicate uploads.
- 2010.01.06 Custom Field Template 1.5.4 Release
- Bugfix: custom field ids.
- 2009.12.11 Custom Field Template 1.5.3 Release
- Bugfix: backslashes and cftsearch.
- 2009.12.04 Custom Field Template 1.5.1 Release
- Bugfix: backslashes are not saved.
- 2009.12.03 Custom Field Template 1.5 Release
- Bugfix: fieldset type.
- Bugfix: ajax save button.
- 2009.11.19 Custom Field Template 1.4.9 Release
- Options to disable the cutom field template, the initialize button, and the save button.
- Bugfix: enctype missing.
- Bugfix: meta values not being deleted when a file is deleted.
- 2009.10.29 Custom Field Template 1.4.8 Release
- Bugfix: file type.
- 2009.10.29 Custom Field Template 1.4.7 Release
- Bugfix: duplicate save_post action.
- Bugfix: file type.
- 2009.10.28 Custom Field Template 1.4.6 Release
- Bugfix: checkbox ID and save.
- 2009.10.26 Custom Field Template 1.4.5 Release
- Bugfix: conflict with the cforms plugin.
- Bugfix: delete the empty data.
- Bugfix: checkbox label.
- 2009.10.19 Custom Field Template 1.4.4 Release
- Bugfix: file type.
- 2009.10.19 Custom Field Template 1.4.3 Release
- Bugfix: group add new button, multiple values, and quotation marks.
- 2009.10.15 Custom Field Template 1.4.2 Release
- Bugfix: search functionality.
- 2009.10.15 Custom Field Template 1.4 Release
- `file` type in order to upload images. If you set `relation = true` with `type = file`, the image you upload will be related to the post you are editing. The image id will be saved as the meta value. You can use the `multiple = true` and `multipleButton = true`.
- The group functionality. The fields between `type = fieldset_open` and `type = fieldset_close` will be enclosed in the fieldset. The key name of the `fieldset_open` and `fieldset_close` must be same. You can use `multipleButton = true` with `type = fieldset_open`. You can also use the `legend = blah` attribute.
- Revision of the interpretation of the template codes.
- Bugfix: loading templates in switching catgories.
- Hangarian and Uzbek.
- 2009.08.31 Custom Field Template 1.3.8 Release
- `readOnly` attribute. ex) `readOnly = true`
- `startDate` and `endDate` attributes for the date picker. ex) `startDate = '1970/01/01'` and `endDate = (new Date()).asString()`
- * `mediaOffImage`, `mediaOffVideo`, `mediaOffAudio`, and `mediaOffMedia` attributes. ex) `mediaOffImage = true`
- 2009.07.28 Custom Field Template 1.3.7 Release
- Bugfix: class attribute of `text` type.
- `shortCode` attribute in order to output the shortcode filtered values. ex) `shortCode = true`
- `outputNone` attribute in case there is no data to output. ex) `outputNone = No Data`
- `singleList` attribute in order to output with `<ul><li>` if the value is single. ex) `singleList = true`
- Option not to display the custom field column on the edit post list page.
- 2009.07.23 Custom Field Template 1.3.6 Release
- Changelog
- Bugfix: class attribute for checkboxes
- 2009.07.05 Custom Field Template 1.3.5 Release
- Bugfix: the_excerpt
- 2009.07.02 Custom Field Template 1.3.4 Release
- Bugfix: Style Sheet
- 2009.06.30 Custom Field Template 1.3.3 Release
- Adds Exerpt Shortcode option
- 2009.06.19 Custom Field Template 1.3.2 Release
- Bugfix: tinyMCE
- 2009.06.18 Custom Field Template 1.3.1 Release
- Bugfix: page template loading, the_excerpt()
- 2009.06.10 Custom Field Template 1.3.0 Release
- Adds the attributes of the date picker in `text` type. (`date = true`, `dateFirstDayOfWeek = 0`, `dateFormat = yyyy/mm/dd`)
- Adds the filter of page template file names (Thanks, Joel Pittet).
- Bugfix: search, post type
- 2009.05.29 Custom Field Template 1.2.7 Release
- Post ID options
- Bugfix: inserting tags and search
- 2009.05.25 Custom Field Template 1.2.6 Release
- Bugfix: inserting images
- 2009.05.17 Custom Field Template 1.2.5 Release
- French and Belorussian
- 2009.05.11 Custom Field Template 1.2.4 Release
- Bugfix: tinyMCE
- 2009.04.30 Custom Field Template 1.2.3 Release
- Bugfix: the_content
- 2009.04.22 Custom Field Template 1.2 Release
- Adds the attributes of multiple fields. (`multiple = true`, `startNum = 5`, `endNum = 10`, `multipleButton = true`)
- Bugfix: search
- 2009.04.12 Custom Field Template 1.1.7 Release
- Adds the maxlength attribute. (`maxlength = 10`)
- 2009.04.07 Custom Field Template 1.1.6 Release
- Applies the auto hook to feeds.
- 2009.04.06 Custom Field Template 1.1.5 Release
- Adds the style attribute.
- Bugfix: output
- 2009.04.06 Custom Field Template 1.1.4 Release
- Bugfix: saving the meta data
- 2009.03.31 Custom Field Template 1.1.3 Release
- Adds the attributes of before and after text. (`before = blah`, `after = blah`)
- Adds the export and import functionality.
- Bugfix: tags
- 2009.03.26 Custom Field Template 1.1.2 Release
- Bugfix: improve the efficiency of saving data
- 2009.03.22 Custom Field Template 1.1.1 Release
- Adds the Initialize button.
- Auto hook inside the content ([cfthook hook=%d])
- Bugfix: category
- 2009.03.12 Custom Field Template 1.1 Release
- Adds the attributes of JavaScript Event Handlers. (`onclick = alert('ok');`) Event Handlers: onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmouseup, onmouseover, onmouseout, onmousemove, onfocus, onblur, onchange, onselect
- Bugfix: category
- 2009.03.08 Custom Field Template 1.0.8 Release
- Adds the option to use the shortcode in the widhet.
- 2009.03.05 Custom Field Template 1.0.7 Release
- Adds the select option of the post type.
- Adds the value count option.
- 2009.02.26 Custom Field Template 1.0.6 Release
- Bugfix: JavaScript
- 2009.02.14 Custom Field Template 1.0.5 Release
- Adds the box title replacement option.
- Bugfix: autosave
- 2009.02.06 Custom Field Template 1.0.4 Release
- Adds the option to disable the quick edit.
- Adds the attribute of HTML Editor in the textarea. (`htmlEditor = true`)
- Italian (it_IT) - Gianni Diurno
- 2009.02.02 Custom Field Template 1.0.3 Release
- Adds the option to disable the default custom fields.
- Bugfix
- 2009.01.28 Custom Field Template 1.0.2 Release
- Bugfix
- 2009.01.27 Custom Field Template 1.0.1 Release
- Bugfix
- 2009.01.27 Custom Field Template 1.0 Release
- Support for the custom field search. (only shows the attributes which have `search = true`.)
- Adds [cftsearch] Shortcode Format. (under development)
- Adds PHP codes for the output value. (`outputCode = 0`)
- Adds PHP codes before saving the values. (`editCode = 0`)
- Adds the save functionality.
- Adds the class option. (`class = text`)
- Adds the auto hook of `the_content()`. (experimental)
- German (de_DE) - F J Kaiser
- Turkish (tr_TR) - Omer Faruk
- Bugfix
- 2009.01.16 Custom Field Template 0.9.2 Release
- Bugfix
- 2009.01.15 Custom Field Template 0.9.1 Release
- Bugfix
- 2009.01.15 Custom Field Template 0.9 Release
- Adds the sort option. (`sort = asc` or `sort = desc`)
- Support for Quick Edit of custom fields. (tinyMCE and mediaButton are not supported yet)
- Bugfix
- 2009.01.09 Custom Field Template 0.8 Release
- Adds the value label option for the case that values are diffrent from viewed values. (`valueLabel = apples # oranges # bananas`)
- Adds the blank option. (`blank = true`)
- Adds the break type. Set CSS of '#cft div'. ex) `type = break` | #cft div { width:50%; float:left; }
- Adds [cft] Shortcode Format.
- Russian (ru_RU) - Sonika
- Bugfix
- 2008.12.22 Custom Field Template 0.7.4 Release
- Bugfix
- 2008.12.20 Custom Field Template 0.7.3 Release
- Spanish (es_ES) - Dario Ferrer (Thank you for the CFT logo!)
- Bugfix
- 2008.12.13 Custom Field Template 0.7.2 Release
- Support PHP codes for `checkbox`.
- Bugfix
- 2008.12.12 Custom Field Template 0.7.1 Release
- Adds Template Instruction
- Bugfix
- 2008.12.09 Custom Field Template 0.7 Release
- Supprt for inserting custom field values into tags automatically. ex) `insertTag = true`
- Adds [cft] Shortcode to display the custom field template. (only shows the attributes which have `output = true`)
- 2008.12.06 Custom Field Template 0.6.5 Release
- You can set an access user level in each field. ex) level = 2
- 2008.12.06 Custom Field Template 0.6.4 Release
- You can use PHP codes in order to set values of `radio` and `select` types. ex) code = 0
- 2008.11.23 Custom Field Template 0.6.3 Release
- Bugfix
- 2008.11.20 Custom Field Template 0.6.2 Release
- Bugfix
- 2008.11.18 Custom Field Template 0.6.1 Release
- Adds wpautop function option
- 2008.11.17 Custom Field Template 0.6 Release
- Adds `type = text`, which is same as `type = textfield`
- Adds an option to replace custom keys by labels
- Bugfix
- 2008.11.13 Custom Field Template 0.5.3 Release
- Bugfix
- 2008.11.05 Custom Field Template 0.5.2 Release
- Bugfix
- 2008.11.05 Custom Field Template 0.5.1 Release
- Adds `label = blah-blah-blah`.
- Adopts CSS design for custom field templates.
- Displays the cft select box only if it has multiple templates.
- 2008.11.05 Custom Field Template 0.5.0 Release
- You can see the full option list in the setting page.
- Adds `clearButton = true` in radios.
- Keeps tinyMCE height after resizing the textarea and saving the post.
- Compatible with WordPress 2.7 Beta 1
- 2008.10.24 Custom Field Template 0.4.4 Release
- Support for the other way of multiple checkboxes. See the example.
- 2008.10.23 Custom Field Template 0.4.3 Release
- Bugfix
- 2008.10.22 Custom Field Template 0.4.2 Release
- Bugfix
- 2008.10.15 Custom Field Template 0.4.1 Release
- Bugfix
- 2008.10.15 Custom Field Template 0.4 Release
- Support for multiple fields with the same key
- Adds hideKey options. ex. hideKey = true
- The default of media buttons is false. ex. mediaButton = true
- 2008.10.08 Custom Field Template 0.3.2 Release
- Bugfix
- 2008.10.05 Custom Field Template 0.3.1 Release
- Support for media buttons in the textarea
- 2008.09.05 Custom Field Template 0.2 Release
- Support for TinyMCE in the textarea
- 2008.08.31 Custom Field Template 0.1.1 Release
- Bugfix
- 2008.08.30 Custom Field Template 0.1 Release
Download
or
Install
- Copy the `custom-field-template` directory into your `wp-content/plugins` directory
- Activate the plugin through the `Plugins` menu in WordPress
- Edit the options in `Settings` > `Custom Field Template`
- That's it! :)
Donation
If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated.
How to use
This is the example of the template. The template format is basically same as the one of the rc:custom_field_gui plugin.
-
[Plan]
-
type = text
-
size = 35
-
label = Where are you going to go?
-
-
[Plan]
-
type = textfield
-
size = 35
-
hideKey = true
-
-
[Favorite Fruits]
-
type = checkbox
-
value = apple # orange # banana # grape
-
default = orange # grape
-
-
[Miles Walked]
-
type = radio
-
value = 0-9 # 10-19 # 20+
-
default = 10-19
-
clearButton = true
-
-
[Temper Level]
-
type = select
-
value = High # Medium # Low
-
default = Low
-
-
[Hidden Thought]
-
type = textarea
-
rows = 4
-
cols = 40
-
tinyMCE = true
-
mediaButton = true
Each section means one custom field. The key of the custom field is between []. The types are textfield, checkbox, radio, select, and textarea. There are some other arbitrary options: size, default, value, rows, and cols. Just do by trial and error.
CSS design for custom field templates
You can change the design of custom field templates by use of CSS in the setting page. This is the default CSS.
-
#cft dl { clear:both; margin:0; padding:0; width:100%; }
-
#cft dt { float:left; font-weight:bold; margin:0; text-align:center; width:20%; }
-
#cft dt .hideKey { visibility:hidden; }
-
#cft dd { float:left; margin:0; text-align:left; width:80%; }
-
#cft dd p.label { font-weight:bold; margin:0; }
[cft] Shortcode for viewing the values of custom field templates
Only shows the attributes which have `output = true`.
post_id
The default is current post_id.
template
TEMPLATE ID. The default is 0.
ex) [cft post_id=10 template=1]
[cft] Shortcode Format
Shortcode Format is applied only if the format attribute is set. TEMPLATE ID is ignored.
format
FORMAT ID. The defalut is null.
ex) [cft format=0]
This is a shortcode format example.
-
<table class="cft">
-
<tbody>
-
<tr>
-
<th>Plan</td><td colspan="3">[Plan]</td>
-
</tr>
-
<tr>
-
<th>Favorite Fruits</th><td>[Favorite Fruits]</td>
-
<th>Miles Walked</th><td>[Miles Walked]</td>
-
</tr>
-
<tr>
-
<th>Temper Level</th><td colspan="3">[Temper Level]</td>
-
</tr>
-
<tr>
-
<th>Hidden Thought</th><td colspan="3">[Hidden Thought]</td>
-
</tr>
-
</tbody>
-
</table>
Thanks.

![WordPress逆引きデザイン事典[2.X対応]](http://ecx.images-amazon.com/images/I/51wvZ9nbUSL._SL160_.jpg)








![コンテンツマネジメント パーフェクトガイド 基本・計画編 [DESIGN IT!BOOKS] (DESIGN IT!BOOKS)](http://ecx.images-amazon.com/images/I/41QpgDmTedL._SL160_.jpg)
![コンテンツマネジメント パーフェクトガイド デザイン・構築編 ~CMSによるコンテンツ管理の実践~ [DESIGN IT!BOOKS] (DESIGN IT!BOOKS)](http://ecx.images-amazon.com/images/I/41U7NAF%2BxjL._SL160_.jpg)



こんにちは、
翻訳ご言い訳マイ自動的に生成されます。
する方法はあるエディタが正常に機能するtinymceを取得するには、 “テキスト”
または”テキスト”セクションですか?
ありがとうございました。
Hello,
Please excuse my automatically generated translation.
Is there a way to get the TinyMCE editor to function in the “TEXTFIELD”
or “TEXTAREA” sections?
thank you.
Posted at 2008.09.05 3:47 am by Kel
Hi Kel,
Thanks, ok in English. This plugin does not support TinyMCE at present. However, I may add the TinyMCE editor in the next version. Let me have some time. Thanks.
Posted at 2008.09.05 4:05 am by Wordpress Go Go
great! – thanks for the plugin. I came across this post, referring to the old Rhymed Code plugin. Might be helpful. http://wordpress.org/support/topic/185935
Posted at 2008.09.05 4:25 am by Kel
I released the custom field template version 0.2. You can use TinyMCE in the textarea. Just add “tinyMCE = true” to the textarea section. Enjoy!
Posted at 2008.09.05 10:16 pm by Wordpress Go Go
Awesome!!! Thank you! I’ll try it out.
Posted at 2008.09.06 4:22 am by Kel
Ohh…. now that’s just really nice. It works perfectly.
Posted at 2008.09.06 4:34 am by Kel
お世話になっております。
Custom Field Templateとても使いやすくて助かっています。
データベースの整理にカスタムフィールドはとても便利なのですが
カスタムフィールドの名前で投稿記事の並び替えが出来なくて困っています。
例えば、カスタムフィールドで映画を管理しているとして
映画のタイトルや星の評価などで記事を並び替えみたいなことです。
query_posts($query_string . "&posts_per_page=3&orderby=カスタムフィールドの名前&order=ASC")
上記のような感じで並び替えが出来ると、もっとカスタムフィールドの幅が
広がると思い実験してみているのですが、なかなかうまくいきません。
MySQLデータベースの posts と usermeta が別々になっているのが問題みたいで
http://wordpress.org/support/topic/169144
Forumsではデータベースの結合をして表示させているみたいのですが
ページ機能や1ページに何件表示するかコントロールしたいので
if (have_posts()) :
while (have_posts()) : the_post();
ループの中に入れて実現したいのですが、うまくいかず困っています。
Custom Field Templateの機能の追加ではないのですが
何かアドバイスをもらえたら幸いです。
よろしくお願いします。
Posted at 2008.09.06 3:14 pm by ニコル
ニコルさん、どうもこんにちは。
さて、カスタムフィールドでの投稿の並び替えですか。やってないから何とも言えませんが、フォーラムで語られてるSQLにLIMITを加えたら表示件数をコントロールできませんかね。
きちんと探してないのであれですが、Search Custom Fieldsというプラグインとかどうでしょうか。かなり古いプラグインではあるのですが、ソースとか見てみると何か参考になりませんでしょうか。
http://guff.szub.net/2006/04/21/search-custom-fields/
Custom Field Templateはカスタムフィールドの出力には関係ないのでどうしようもありません。
それでは頑張ってみてください。
Posted at 2008.09.07 4:42 am by Wordpress Go Go
返事が遅くなって申し訳ありません。
LIMITで表示件数はコントロール出来るのですが、
表示件数が20件あったとして、表示設定の1ページに表示する投稿数で10件表示させるようにしていると
2ページ目にも最初の10件が表示されてしまいます。
ページ機能を使用しなければ、全件表示することやLIMITで件数もコントロール出来るのですが
表示件数が多い場合もあるので、ページ機能を使用したいのです。
SQL文からforeachで記事を表示させているので、そうなると思うのですが
if (have_posts()) :
while (have_posts()) : the_post();
とフォーラムのSQL文を併用することは出来ないでしょうか?
Search Custom Fieldsは参考になりそうなのですが、
こちらの知識が乏しく、うまく理解出来ていません。
周りにPHPに詳しい人がいないので、どうかお力をお貸しください。
お手数ですが、よろしくお願いします。
Posted at 2008.09.10 1:02 am by ニコル
ニコルさん、どうもこんにちは。
設定の表示投稿数と異なる件数を独自のqueryに適応させてページ機能を使用するというのはなかなかやっかいですね。一番いいのは設定の投稿数を表示したい件数にしてしまえばいいのですが、恐らく、カテゴリに応じて変更したいといったところでしょうか。
やるとすれば、特定のカテゴリに属する投稿のみに設定とは異なる表示件数を設定するようにフィルタをかます、というような感じになるんじゃないでしょうか。それをfunctions.phpなり、プラグインなりでやればいいような気がしますが実際にやってないのでわかりません。
have_posts()やthe_post()はWP_Queryクラスのメソッドなので、独自のqueryには使えないですね。フォーラムのSQL文をWP_Query内でできるようにフィルタなり、改造するなりすればできるかもしれませんが面倒そうです。
それでは頑張ってください。
Posted at 2008.09.10 1:39 am by Wordpress Go Go
お返事ありがとうございます。
>カテゴリに応じて変更したいといったところでしょうか。
そうなんです、カテゴリごとに表示件数をコントロールしていますので
設定の投稿数を同じ件数に出来ないんです。
色々、調べてみたり実験してみたのですが
知識不足、技術不足で行き詰っています。
不躾なお願いで、申し訳ないのですが、
お時間が空いている時で構いませんので
実験してくれませんでしょうか?
よろしくお願いします。
Posted at 2008.09.11 2:49 am by ニコル
Hi, it’s a great plugin. It’s very very helpful to use for high dependable custom field themes.
However, is it possible to add Key = Image and Value = link to images?
If so, would you mind show me how to do it?
Sorry for the request. Thank you very much.
Posted at 2008.09.21 2:37 am by Robin
Hi Robin,
I am sorry for my late reply. I do not understand well what you would like to do. You mean that you put the image link into the custom field value and just display the image on the post? If so, it may be easy to do that. See the following documents.
http://justintadlock.com/archives/2007/10/27/wordpress-custom-fields-adding-images-to-posts
http://codex.wordpress.org/Using_Custom_Fields
I hope they would be helpful for you. Thanks.
Posted at 2008.09.23 12:47 am by Wordpress Go Go
はじめまして、maresといいます。
早速ですが、最新バージョン(0.3.1)を使ってみたのですが、
tinymceを有効にしたテンプレートからtinymceのないテンプレートに
切り替えると、WPのadmin-ajax.php(オートセーブ機能?)が動作するする時に、
tinymceが”e has no properties”とスクリプトエラーを発生させ、
それ以降、admin-ajax.phpが動作しないようです。
通常であれば、新規作成以外、途中でテンプレートを切り替えることは
あまりない思いますが、いちをご報告しておきます。
(もしかすると、このエラーは私の環境だけかもしれませんが・・・)
尚、条件は下記の通りです。
・wordpress 2.6.2
・プラグインは、Custom Field Template plugin 0.3.1のみ
・ブラウザは、Firefox 2.0系 + Firebug(IEは試してません)
少し調べてみたところ、テンプレートを切り替えるタイミングで、
tinymceを使っている場合には、tinymceのコマンド”mceRemoveControl”を
実行して、一端removeするとスクリプトエラーが回避できました。
(この方法がベストかわかりませんが、いまのところ動作しています。)
Posted at 2008.10.07 6:05 pm by mares
maresさん、こんにちは。
バグを教えていただきましてありがとうございます。不具合を修正したバージョンをリリースいたしました。
maresさんのご指摘いただいたテンプレートの切り替えで、admin-ajax.phpが動作しなくなるというのはとりあえず修正されていると思います。
しかしながら、本文の投稿欄の入力モードがHTMLで、カスタムフィールドにtinyMCEが使用されていた場合にも自動保存が利かなくなるようでして、こういう条件下では本文の投稿欄の入力モードをHTMLからtinyMCEに切り替えるように設定しました。どうも本文の投稿欄が最初にtinyMCEに設定してあれば、後でHTMLモードに変えてもエラーはでなくなります。なのでこういう条件下で、初期モードがHTMLの場合はHTML --> tinyMCE --> HTMLで元に戻してやればいいんじゃないかと思ったんですが、非同期がうまくできませんでした。
まだ修正できていないのは、本文の投稿欄もカスタムフィールドもHTMLモードで、カスタムフィールドを切り替えてtinyMCEのtextareaが出てきたとき、自動保存がうまく機能しなくなります。
ちょっとこの説明だと分かりにくかったかもしれませんが、カスタムフィールドでtinyMCEを使用したい場合は、本文の投稿欄もビジュアルに設定しておいてほしい、ということです。
とりあえず最新バージョンを使ってみてください。それではよろしくお願いします。
Posted at 2008.10.08 3:40 am by Wordpress Go Go
早々の対応ありがとうございます。
試してみましたが、問題なく動作しています。
私の使い方は、基本的に投稿欄はtinymceなので、投稿欄がHTMLの場合、
エラーが発生しているのは気付きませんでした。
また、不明な点がありましたらご連絡しますので、よろしくお願いします。
Posted at 2008.10.08 4:42 pm by mares
Is there a way to have the template create multiple fields with the same key? For example, if I want to add the names of multiple “co-authors” to a post about a book. I know I could do something like:
template name=”authors”
[author]
type = textfield
size = 50
[author]
type = textfield
size = 50
[author]
type = textfield
size = 50
Which would give me up to 3 “co-authors”, but is there a way to use the plugin if I don’t know how many co-authors there might be?
Posted at 2008.10.14 3:17 am by Ben Rice
Hi Ben,
At present, this plugin does not support multiple fields with the same key which you do not know how many fields exist. I will consider about this in the next release. Thanks.
Posted at 2008.10.14 9:59 am by Wordpress Go Go
Hello,
I was fond of rc:custom_field_gui back in the days, so I am glad you update the idea.
But there’s an incompatibility between custom-field-template and Viper Video Quicktags: the video buttons disappear from the write post/page editor toolbar when custom-field-template is activated.
Posted at 2008.10.15 8:41 am by Lionel Chollet
Hi Lionel,
I installed Viper Video Quicktags plugin and confirmed that the video buttons worked properly on the write editor with the custom field template plugin. Are you sure the custom field template is imcompatible with Viper Video Quicktags?
Posted at 2008.10.15 1:05 pm by Wordpress Go Go
In the HTML editor (I don’t use the visual editor), Viper Video buttons disappear whenever CFT is activated, and come back upon CFT’s deactivation.
Maybe there’s more than one plugin at fault here — i.e. it’s the interaction of CFT with another plugin that cause the problem with Viper Video buttons — but deactivating CFT only solves the issue.
Posted at 2008.10.15 7:47 pm by Lionel Chollet
I confirmed your situation when the visual editor was unchecked in personal options. I fixed this bug and released the version 0.4.1. I hope this will work well. Thanks.
Posted at 2008.10.15 9:27 pm by Wordpress Go Go
Same issue with just installed CFT version 0.4.
Configuration : WordPress 2.6.2 FR – CFT 0.4 – Viper Video Quicktags 6.1.2
Posted at 2008.10.15 9:33 pm by Lionel Chollet
OK, just saw your reply above. WIll try version 0.41 ASAP. Thanks !
Posted at 2008.10.15 9:34 pm by Lionel Chollet
Custom Field Template 0.4.1 vs. Viper Video Quicktags 6.1.2: this topic is resolved.
Thanks again!
Posted at 2008.10.15 9:41 pm by Lionel Chollet
hi. Thanks for plugin
perfect.
Regards
Posted at 2008.10.16 12:09 am by baron
This plugin has a major bug. When activated, the “insert into post” does not work for the default Wordpress gallery. You might want to look into this ;)
I believe its a Javascript conflict
Posted at 2008.10.16 7:41 am by Axertion
Hi Axertion,
You mean `Insert gallery into post`? I tested it and confirmed it is working. Well, [gallery] works only in the post field, not in custom fields. Could you tell me the detail of your situation? Are you using other plugins which seem to break it?
Posted at 2008.10.16 12:51 pm by Wordpress Go Go
I have installed it and activated it but it will not display. What do I need to do to have it displayed? Thanks. Please email me
Posted at 2008.10.17 5:42 am by Ken
HI,
Thanks for a wonderful plugin. It makes using Custom fields so much easier. I need your help in configuring the following. I am giving the client a set of checkboxes whose items are links to product pages. When editing the page, the client just needs to check whether that product is applicable or not. The page will then show only those links that are checked. My question is how do I put the hyperlink in the checkbox items using the plugin?
Thanks
Ashish
Posted at 2008.10.22 9:52 pm by Ashish
Hi Ashish,
If you let your client choose one checkbox, use radio buttons. Something like this.
[link]
type = radio
value = http://wordpressgogo.com/news/ # http://wordpressgogo.com/plugins/ # http://wordpressgogo.com/themes/
default = http://wordpressgogo.com/news/
If multiple checkboxes, something like this.
[link]
type = checkbox
value = http://wordpressgogo.com/news/
checked = true
[link]
type = checkbox
value = http://wordpressgogo.com/plugins/
hideKey = true
[link]
type = checkbox
value = http://wordpressgogo.com/themes/
hideKey = true
Well, you may also use select boxes. Anyway, please try out various ways.
Posted at 2008.10.22 10:59 pm by Wordpress Go Go
Hi,
Thanks for such a quick response. I have no problem placing the link text, but there is no hyperlink as in
Posted at 2008.10.23 1:13 pm by Ashish
Sorry – placing the HTML code for hyperlink seems to have eaten up the rest of my comment. What I meant was to place the actual HTML tag with hyperlink, next to the checkbox – not just the link text. I cannot do so currently through CFT, but can, by using the custom fields on the page editor itself, which is cumbersome.
Is there a way of achieving it with CFT and Checkboxes?
Thanks
Ashish
Posted at 2008.10.23 1:16 pm by Ashish
Hi Ashish,
I understand what you said. I released the version 0.4.3 which fixed this problem. I hope this will work well. Thanks.
Posted at 2008.10.23 6:42 pm by Wordpress Go Go
Hiroaki San,
Thanks for taking the effort to include this feature. I will just test it an let you know the feedback.
Thanks
Ashish
Posted at 2008.10.26 12:02 am by Ashish
Hiroaki San,
I tried using it and now it shows the hyperlinked option as I expect. Also the right url when I hover over it. But on publishing the page, the url shown for that link is actually the link address appended to current page address with backslashes. please take a look at http://sapling.in/apsl/solutions/technology-solutions/data-center-console-management/gui-console-management and hover over the BFSI link on right hand side to see what I mean
Thanks
ashish
Posted at 2008.10.26 12:12 am by Ashish
Hi Ashish,
I tried it and confirmed it worked in my test site. Well, could you save your custom field option and try it again? After editing a post, could you confirm the default custom field sections (not custom field template sections) and whether the values include backslashes or not?
Posted at 2008.10.27 1:03 am by Wordpress Go Go
Hi,
I checked the values and they are as below:
I entered the following:
value = BFSI
It shows in the default custom fields sections as:
BFSI
(the \ is actually the backslash)
And on clicking BFSI on the actual page, it takes me to:
http://sapling.in/apsl/solutions/technology-solutions/data-center-console-management/%5C%22http://www.sapling.in%5C%22 (here, %5C%22 is the backslash)
Is there a mistake in the way I enter the values?
Thanks
Ashish
Posted at 2008.10.27 10:21 pm by Ashish
The href value in the default custom field section is \”http://www.sapling.in\”, which did not show properly in the last comment.
Posted at 2008.10.27 10:24 pm by Ashish
So the value in the default custom field section includes backslashes. Hmmm, it should not include them. Have you tried from the beginning of setting the custom field template options again? Every time backslashes are included in the values?
Posted at 2008.10.28 2:18 am by Wordpress Go Go
Hiroaki San,
I found the problem…When I use the “http://link.com” I get the backslashes. When I use http://link.com without the double-quotes, the link comes out all correct. Now only if you could include it in the documentation :) …
Thanks again for the wonderful plugin.
- Ashish
Posted at 2008.10.30 12:32 pm by Ashish
Hmmm, I understand what you say. But it should show correctly even if the link has double-quotes. Well, I will keep investigating this issue. Thanks.
Posted at 2008.10.30 1:31 pm by Wordpress Go Go
Hello,
I’ve found that the Custom Field Template plugin seem to conflict with the WordPress uploader in the Write Post/Page panel.
See this post: http://wordpress.org/support/topic/197027?replies=29#post-887745
Posted at 2008.10.31 2:52 am by Lionel Chollet
Hi Lionel,
I saw your post on the support forum. Well, could you try after activating only the custom field template plugin? If it works, some other plugins may conflict with the custom field template plugin. If it does not work, the custom field template plugin seems to be strange. However, in my wordpress the image uploader works with the custom field template plugin. Thanks.
Posted at 2008.10.31 3:55 am by Wordpress Go Go
if i use Custom Field Template and qTranslate ,the post content is blank after i saved the post.
Posted at 2008.11.04 12:52 pm by tankuan
Hi tankuan,
I installed qTranslate and noticed the post content were not saved properly when using tinyMCE in the custom field template. So tentatively do not use `tinyMCE = true` option in textareas. I will consider this issue in the future release.
Posted at 2008.11.04 2:34 pm by Wordpress Go Go
Is there any way to get “Custom Field Template” section to appear above the “Post” section (the WYSIWYG editor) in the Write Post/Pages?
Translation:
「ポスト」セクション(WYSIWYGのエディター)の上で「習慣フィールド・テンプレート」に現われるセクションを持って来る全ての方法でそこにある 書くことポスト/ページで?
Posted at 2008.11.13 12:15 pm by Drath
Hi Drath,
If you want to set custom field templates above the post section, you may need to edit WordPress core files. The positions of title and content are fixed. It seems to be difficult to change that without any hacks.
Posted at 2008.11.13 4:44 pm by Wordpress Go Go
はじめまして、WP2.7b2-ja でテスト導入させていただきました。
非常に便利なプラグインだと思います。ありがとうございます。
早速ですが 2点の報告と1点の要望があります。
まず 1 点目の報告ですが、 textfield タイプの input 要素の type 属性値が v0.5.3 現在 textfield になっていますが、ここは text であるべきだと思いますので、どこかで修正をしていただけたらと思います。
次に 2 点目、load_plugin_textdomain() 関数の引数の関係で、私の環境では多言語化が出来ません。今のところ
load_plugin_textdomain(‘custom-field-template’, ‘wp-content/plugins/custom-field-template’);
となっていますが、これが、
load_plugin_textdomain(‘custom-field-template’, PLUGINDIR.’/’.dirname(plugin_basename(__FILE__)), dirname(plugin_basename(__FILE__)));
となっているとありがたいです。定数を使用しているのは、WP2.5 以降 (?)、 wp-content ディレクトリ以外にテーマやプラグイン、アタッチメントファイルを格納できるようになったためです。これについても可能ならば修正をお願いできますか?
最後に、これは勝手な要望ですが、 label を設定した際、label の表示位置は フォームアイテム要素の上ではなく、カスタムフィールドのキー名が現在表示されている箇所に、カスタムフィールドのキー名の代わりに表示されるようになって欲しい、またデータの記入例を挿入する項目が新たに欲しい (出来れば現在 label が表示されている位置などに)、と思います。
自分一人で WordPress を運用する場合には現状何も問題ないのですが、他の人と共同で運営する場合、その人にカスタムフィールドのキー名を意識させたくないことと、入力するデータのフォーマットをある程度規定したい用途 (たとえばイベントの日付を入力する場合など) を想定しています。
以上、前向きに検討していただければ幸いです。
Posted at 2008.11.14 8:01 pm by mizube
Hello, i’m the one that was asking about changing the position.
I found the exact locations needed to place the code in edit-form-advanced.php to basically put content in between the title and post fields. I just need to know which code from custom-field-template.php to put in there. Could you help me with this at all? Thank you.
Posted at 2008.11.16 3:37 pm by Drath
mizubeさん、お返事遅くなりました。
修正、ご要望に応じましたバージョン0.6をリリースしておりますので使用してみてください。
まず、type属性がtextfieldになっていた点はtextに修正しました。合わせてテンプレートの設定でも`type = text`が使えるようにしました。
load_plugin_textdomainにはwp-content ディレクトリ以外でも使用できるように定数利用に変更しました。うまく日本語化できるかご確認ください。こちらでは確認しておりませんので、よろしければうまくいったかどうかお知らせいただければ幸いです。
カスタムフィールドのキー名をラベルで置き換えるオプションを設定画面に追加しております。このオプションにチェックを入れると、ラベルがある場合のみ、カスタムフィールドのキー名の代わりにラベルを表示するようになります。試してみていただけたらと思います。
以上、うまくいくといいのですが、何かございましたらご連絡ください。
Posted at 2008.11.17 4:12 am by Wordpress Go Go
Hi Drath,
Try following codes into edit-form-advanced.php:
<php $custom_field_template->insert_custom_field(); ?>
You may need to comment out the lines 74-82 of the lateset version 0.6 of custom-field-template.php in order to avoid dupliacating the templates.
FYI, TinyMCE may not work properly.
I hope this will help you at all. Thanks.
Posted at 2008.11.17 4:21 am by Wordpress Go Go
This is almost there! Thanks for all the help. There seems to be a huge gap of whitespace above the custom fields for some reason. I have looked at the CSS that this plugin adds, but I can’t see anything that would do this. Any suggestions? Thanks again!
Posted at 2008.11.17 8:49 am by Drath
Hmmm, I do not know why whitespace is inserted. Is it because of the position where you put the code? Could you try to put it into other places and confirm whether the same situation happens or not? Thanks.
Posted at 2008.11.17 12:12 pm by Wordpress Go Go
こんばんは。
早速の反映、ありがとうございます。
アップグレードしてみたところ、私の環境では無事 l10n されましたのでご報告いたします。ただし通常通り wp-content ディレクトリを使用している場合の動作についてはこちらでは確認しておりません。
ラベル入れ替えのオプションはカスタムフィールドのキーを表示させたい方もいるでしょうから、良いアイデアですね!
Posted at 2008.11.17 7:39 pm by mizube
どうもご連絡いただきましたありがとうございます。
無事に翻訳できたようで何よりです。
また何かありましたらご連絡ください。
Posted at 2008.11.17 8:41 pm by Wordpress Go Go
It doesn’t matter where I put it, it looks like it always tries to push it into the spot where it would sit normally in the write page. I’ve tried an echo statement and it produced no whitespace.
I tried uncommenting out the code in the plugin and it looks like when both are called, it’s placing the template stuff back in “Custom Field Template” tab. So it basically doubles itself, which proves my above statement – it tries to put it under the title/WYSIWYG box even though it isn’t (resulting in the whitespace).
Posted at 2008.11.18 5:10 am by Drath
I put the code I mentioned above into the line 211 of edit-form-advanced.php of WP2.6. Just above `<div id=”< ?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>” class=”postarea”>`. I think it looks good and could not confirm any whitespace. Hmmm, it is strange.
Posted at 2008.11.18 1:51 pm by Wordpress Go Go
I’m trying to get WordPress to return a dropdown list (a SELECT MENU – similar to how we use “wp_dropdown_categories”) of VALUES for a particular custom KEY that I’ve entered in via the Custom Field Template.
I’d like to use this dropdown list as a way to filter the results shown on the page.
Can anyone point me to any examples or possibly something on the WP Codex?
The way that Custom Field Template plugin shows a dropdown list (Select Menu) is exactly what I need, except I need to show it on the site, not in the admin section.
thanks!
Posted at 2008.11.19 4:42 am by Kel
Hello,
Thank you very much for the plugin. It’s great, and saves me a lot of time!
I have found a problem though. I use custom fields for a custom rating system of mine.
I used your plugin to select from 0-5 rating.
But when I select “0″. It sets the field blank, or non existent.
I have to manually set it to “0″ using the default wordpress fields.
Many thanks,
Matt
Posted at 2008.11.23 3:00 am by Matt
Hi Matt,
I released the version 0.6.3. Probably you can set 0 as value of custom fields. Please try to use it.
Posted at 2008.11.23 11:09 am by Wordpress Go Go
Hi Hiroaki,
It Works great now! Many thanks for fixing this bug so fast, it’s very much appreciated.
Thanks again for the great plugin!
Matt
Posted at 2008.11.23 12:01 pm by Matt
Hi,
Great plugin!
Is there a way to run a PHP script inside the template configuration text to produce a select list based on, for example, the post titles under a certain category?
Thanks.
Posted at 2008.12.06 1:33 am by Stephen
Hi Stephen,
I released the version 0.6.4. You can use PHP codes in order to set values of `radio` and `select` types. See the option page.
This is an example to show a select list of post titles under a certain category.
—- Template
[posts]
type = select
code = 0
—-
—- CODE# 0
$values = array();
$posts = get_posts(‘category=1′);
foreach($posts as $post) {
$values[] = $post->post_title;
}
—-
Basically, you need to set $values as an array. you can also set $default also. Here is an easier example.
—-
$values = array(‘dog’, ‘cat’, ‘monkey’);
$default = ‘cat’;
—-
I hope this option will work properly for you.
Thanks.
Posted at 2008.12.06 5:08 am by Wordpress Go Go
Hi,for a question on the wp.org,someon introduced me CFT,and it is a good plugin :)
So could u consider the problem list in below links?
Many Thx.
http://wordpress.org/support/topic/220905
Posted at 2008.12.06 2:06 pm by Vincent
Hi Vincent,
I released the version 0.6.5. This supports user levels. You can set something like `level = 2` in each field. See the following example.
[price]
type = text
level = 2
[discout]
type = text
level = 5
Thanks.
Posted at 2008.12.06 3:59 pm by Wordpress Go Go
That’s fantastic! Thank you. Such a valuable plugin!
Posted at 2008.12.08 10:37 pm by Stephen
This plugin is conflicted with WYSIYG of the WP 2.7, It will expand the WYSISYG More tab function.
Posted at 2008.12.11 2:57 pm by Willy
Hi Willy,
Could you explain more detail about it? You mean that tinyMCE in the custom field template includes `MORE` function? You would like to disable this button in the custom field template?
Posted at 2008.12.11 3:21 pm by Wordpress Go Go
Ok in the tinyMCE there is second row of toolbar that can be expand if you click on “Show/Hide” icon.
But when you activate the Custom Field Template the second toolbar row cannot be expanded anymore.
Thanks
Posted at 2008.12.12 11:11 am by Willy
Which browser are you using? Could you try to deactivate all plugins except the custom field template plugin? Some plugins you are using may be incompatible with the custom field template plugin.
Posted at 2008.12.12 1:31 pm by Wordpress Go Go
Hello,
Thank you for your plugin. It is essential and fantastic!
It would be nice to have a field for a Note or Instructions.
Example…
Template 1 Title: Custom flickr Link
Template 1 Note: Remember to include the full ULR, including http://
I build websites for other people who need instructions. This would be a great feature.
Posted at 2008.12.12 1:47 pm by matthew
You mean a note for each template? OK, I will add note sections in the next release. Thank you.
Posted at 2008.12.12 1:52 pm by Wordpress Go Go
Oh, do not forget you can set `label` in each field.
Posted at 2008.12.12 1:53 pm by Wordpress Go Go
You are right is conflicted with Akismet 2.2.3, I am testing this in two browser Explorer 7 and Safari 3.2.1 all browsers are currently updated. Thanks again.
Posted at 2008.12.12 10:39 pm by Willy
I am using the currently release of Custom Field Template 0.7.1
Posted at 2008.12.12 10:41 pm by Willy
Setting values for select and radio boxes using PHP is working well. Just wondering if the same can be configured for check boxes too? It would be useful to select multiple values from the PHP defined list…
Posted at 2008.12.12 10:41 pm by Stephen
Hi Willy,
It is weird because Akismet dose not seem to be related to tinyMCE. Are there any JavaScript errors when you click on `Show/Hide` icon? To confirm the errors, please try to use the tools like Firebug.
Posted at 2008.12.12 11:13 pm by Wordpress Go Go
Hi Stephen,
Checkboxes have a little bit complicated logic code. I want to support checkboxes too, but may take time. Thank you for being patient.
Posted at 2008.12.12 11:43 pm by Wordpress Go Go
Thank you… you rock. :)
Posted at 2008.12.12 11:58 pm by Stephen
Hi Stephen,
It has not take much time:) I released the version 0.7.2 which supported PHP codes for `checkbox`. One note: default values of `checkbox` must be set by `$defaults` not `$default`. `$default` is only for `radio` and `select`. $values is same. Please try it out.
Posted at 2008.12.13 4:10 am by Wordpress Go Go
Excellent! Thank you.
I’ve managed to use scripting to bring up a list of values based on post/pages, and then if an post/page is removed, the value is still drawn at the top of the list…
Thanks again. :)
Posted at 2008.12.17 2:43 am by Stephen
Well, I do not know what scripts you made, so I am not sure what is the cause… Tell me the detail if you can. Thanks.
Posted at 2008.12.17 3:08 am by Wordpress Go Go
No, that’s exactly how I want it to work… :)
Posted at 2008.12.17 11:14 pm by Stephen
Oh, I see. I am glad to hear that. Tell me again if you want more functionalities. Thanks.
Posted at 2008.12.17 11:17 pm by Wordpress Go Go
先日はこのプラグインへの要望を取り入れていただき、お世話になりました。
実は、 PHP のショートオープンタグが off になっている環境で WordPress とこのプラグインを利用したいと考えていたのですが、このプラグインでは設定ページの入力欄のデータを表示するためにショートオープンタグが使用されています( のコードがそのまま表示されてしまいます。
残念ながら理由あって PHP の設定をこちらの都合で変更することが出来ず、アップグレードのたびにコードを書き換えるしかないという状況です。
もしコーディングの際のポリシーがおありなのでしたらお気を悪くなさらないで頂きたいのですが、もしよろしければ次回のバージョンアップの際にはショートオープンタグの使用を避けて
Posted at 2008.12.21 10:59 pm by mizube
# コメントが途中でカットされました。失礼しました。以下続き
>?= ではなく >?php echo で対応していただけませんでしょうか。
ご検討よろしくお願いいたします。
Posted at 2008.12.21 11:01 pm by mizube
<?= でした。文字参照を間違えました;;
Posted at 2008.12.21 11:01 pm by mizube
mizubeさん、こんにちは。
あんまり意識せずにコード書いていたので勉強になりました。ショートオープンタグを使用しないようにコードを書き換えましたので0.7.4以降をご使用いただけたらと思います。また何かありましたらお気軽にお願いします。
Posted at 2008.12.23 1:41 am by Wordpress Go Go
こんばんは。
素早い対応をして頂きありがとうございます!
正しく動作することを確認致しましたのでご報告させて頂きます。この度はみっともないコメントを連投してしまい申し訳ありませんでした。
Posted at 2008.12.24 1:51 am by mizube
Hello again, we are enjoying your plugin a lot, thanks for the hard work.
I think I’ve found a bug. When using the visual editor, I can’t change between the different templates I’ve created when creating a page. If I disable the visual editor, it works. DO you know what could be the problem? Thanks.
Posted at 2008.12.24 10:45 am by verowhite
Hi verowhite,
Which version of WordPress are you using now? Are you using the latest version of the custom field template? Have you tried several browsers? Are there any JavaScript bugs when you change the templates? Try to use the tools like Firebug of Firefox. In my case, WP2.7 and CFT0.7.4, I think it works properly. Let me know your infomation. Thanks.
Posted at 2008.12.24 11:18 am by Wordpress Go Go
Thanks for your reply. I’ve tried both with Safari and Firefox. I’m using WP 2.7 and CFT 0.7.4.
This is the error that my Webdeveloper Firefox Extension finds:
Error: uncaught exception: [Exception... "Cannot convert WrappedNative to function" nsresult: "0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)" location: "JS frame :: http://love2d.com/wp-admin/page.php?action=edit&post=761 :: onchange :: line 1" data: no]
Posted at 2008.12.24 1:11 pm by verowhite
Get0.7.4 right now!
Keep Going!
Posted at 2008.12.24 1:40 pm by Vincent
Hmmm, other plugins may conflict with CFT. could you try to deactivate other plugins except CFT?
Posted at 2008.12.24 1:53 pm by Wordpress Go Go
I deactivated every plugin except CFT, keep getting the same error. Weird.
Posted at 2008.12.24 7:43 pm by verowhite
Hmmm, really weird. There may exist something to cause the error, but I have no idea. If you have several wordpress you can manage, confirm it in other environment. I am sorry that I can not resolve it soon. I will keep investigating. Thanks.
Posted at 2008.12.25 1:27 am by Wordpress Go Go
I’m still trying to find out about the conflict with other pugins, but still haven’t figured out my CSS issues. No matter how I try to add the CSS information to format the output of CFT it doesn’t affect it. I added the classes to style.css, but still doesn’t work.
Maybe someone can take a look for me and find out what’s wrong? Thank you! Here’s an example:
http://love2d.com/interpretes/aaliyah/
Posted at 2008.12.26 11:17 am by verowhite
CSS which you add in the setting page of CFT is for Add or Edit Post page in admin. You need to add CSS into your theme directly like style.css.
I looked at your site and noticed you set #cft in style.css. CFT outputs as Class not ID. So you have to set .cft.
Please try it out. Thanks.
Posted at 2008.12.26 12:05 pm by Wordpress Go Go
Hi! I made russian translation forcustom-field-template 074:sonika.ru/blog/wp-content/downloads/custom-field-template-0.7.4-ru_RU.zip
http://www.sonika.ru/blog/wordpress/custom-field-template-rus.htm
Thanks for cool plugin!
Posted at 2008.12.27 12:14 am by sonika
That worked like a charm, thanks a lot. Still trying to figure out the problem when switching templates though.
Thanks!
Posted at 2008.12.27 4:52 am by verowhite
Hi sonika,
Thank you so much for translating into Russian. I will include it in the next release.
Posted at 2008.12.27 12:31 pm by Wordpress Go Go
Bug report
Radio buttons appeared not to be respecting the default value. Tracked it down to here in the make_radio method. My temporary fix is commented.
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
$selected = get_post_meta( $_REQUEST[ 'post' ], $title );
$selected = $selected[ $sid ];
}
else {
$selected = $default;
}
/**/
$selected=$default;
/**/
Posted at 2009.01.01 2:20 am by Jonathan Bailey
Hi Jonathan,
Thank you for your report. However, I think there is no need to change because every time you edit posts the velues of radio boxes are reset as the default in your code. It should be set as the value you selected before, shouldn’ it? I may misunderstand what you say. Thanks.
Posted at 2009.01.01 1:19 pm by Wordpress Go Go
Hello,
First let me say that I am really impressed iwth the simplicity of this product and how flexible it leaves an advanced user to customize their own application of it. Thanks for your contribution to the rest of us lowly WordPressers.
I did however, have a potential bug report or simply a question. When I am using textareas, it is automatically adding content “Tags” to my posts, with the value being the same value of the textarea.
I thought perhaps this was being caused by the “insertTag” parameter, but tried both ways with no luck.
What is going on here? How do I stop this from happening?
My code:
[pImage]
type = textarea
label = Project Image
mediaButton = true
insertTag = true
rows = 1
cols = 80
insertTag = false
Posted at 2009.01.07 12:05 pm by Stevil
Hi Stevil,
If you do not want to use the automatic tag inserting, just delete insertTag = true. Something like this:
[pImage]
type = textarea
label = Project Image
mediaButton = true
rows = 1
cols = 80
Posted at 2009.01.07 12:34 pm by Wordpress Go Go
What an idiot I am!! LOL
I def did not notice, until you responded that I had the insertTag = true in there.
HAHA! I was so confused.
Sorry for the utter waste of time. You are the bees knees.
Posted at 2009.01.07 1:11 pm by Stevil
I am using WPv2.7 with theme BranfordMagazine 2.6 2.6 for a new site.I can’t get the Custom fields I have set up to show. Can you suggest how I might troubleshoot this issue? Would be great to be able to use the plugin.
Posted at 2009.01.07 7:26 pm by Enquiry
Hi Enquiry,
What you are talking is about the [cft] shortcode, isn’t it? Have you set `output = true` in each attribute of custom field templates on the setting page? [cft] only show the values which are set as `output = true`. Please check it out. Thanks.
Posted at 2009.01.07 7:57 pm by Wordpress Go Go
Hi. yes I did this. Maybe the theme isn’t compatible with this> How would I check? Just to summarize: all I have done so far is upload into the plugins and activate. Amended the settings and added the output=true statement as you suggest. Still nothing. Does one need to change any of the themese files or WP core files?
Posted at 2009.01.09 12:48 am by Enquiry
You do not need to change any files. Hmmm, I am not sure what is the cause. Please try to deactivate other plugins except the custom field template plugin. You may change to the default theme. Thanks.
Posted at 2009.01.09 7:45 am by Wordpress Go Go
Love this plugin! Thanks for your work.
I want to make the custom fields present as a 2-column “list” in the Add New Post page. Tried inserting table tags around the “” terms, with no luck as they package each individual custom field, not the group as a list.
Instead of going the table route, I’m hoping to use the list_as_columns function, but still don’t know where exactly it would go.
Thanks in advance for your help!
Posted at 2009.01.09 9:53 am by Beth
Hi Beth,
I released the version 0.8. I added the break option. This is two column example:
—————–
[Plan]
type = text
size = 35
label = Where are you going to go?
[Any]
type = break
[Favorite Fruits]
type = checkbox
value = apple # orange # banana
default = orange
—————–
Adds the style sheet like this:
—————–
#cft div { width:50%; float:left; }
—————–
I hope it will work properly as you want.
Posted at 2009.01.09 10:03 pm by Wordpress Go Go
Works like a charm. Huge thanks!
Posted at 2009.01.10 6:34 am by Beth
can we sort these custom field value? for example: sort by price?
Thanks, really appreciate your hardwork!
Posted at 2009.01.11 7:23 am by indojepang
Ichiban desho ne. Domo arigato. Cheers.
Posted at 2009.01.15 12:38 pm by mercime
Hi indojepang,
I added the sort option. Use `sort = asc` or `sort = desc`. Please try it out.
Posted at 2009.01.15 4:11 pm by Wordpress Go Go
Hello,
First of all, thanks for writing this great plugin!
I use it on a site which relies heavily on custom data.
Ideea nr. 1: for each field, have an option to make it mandatory (i.e., you can’t save a post if you haven’t filled that field)
Ideea nr 2: for text inputs, have auto-suggest from all values inserted before (like on the tags input field)
Tell me what you think.
Posted at 2009.01.15 8:17 pm by scribu
Your short-code example is missing the closing at the roe “plan”
Posted at 2009.01.15 11:05 pm by f-j-k
Hi f-j-k,
You mean that `</td>` at the Plan should be `</th>`? Thank you. I will fix this in the next version.
Posted at 2009.01.16 12:28 am by Wordpress Go Go
got the following error when using [ctf format=1]
Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘O’ in /nfs/c02/h04/mnt/43248/domains/*****/wp-content/plugins/custom-field-template/custom-field-template.php on line 1383
Posted at 2009.01.16 12:40 am by f-j-k
Hi scribu,
Thank you for your ideas. About the first idea, if you set `blank = true`, you can save the custom field if it is blank. In the case the field is blank, there is no way to show some errors currently. So it is better to set error conditions for each field. About the second idea, I agree to the auto-suggest functionality. I will consider to add these ideas in the future version. Thank you.
Posted at 2009.01.16 12:44 am by Wordpress Go Go
Hi f-j-k,
Probably I fixed the bug in the version 0.9.2. Please try it out.
Posted at 2009.01.16 1:11 am by Wordpress Go Go
Seems to have a conflict for me with Admin Management Xtended Plugin. When both are activated I see custom fields in the list of posts on the regular edit.php page. it didn’t do it before 9.2. Just a heads up.
Posted at 2009.01.19 5:28 am by Jake
I just uninstalled Admin Management Xtended. It isn’t very necessary anymore. So I am not sure what the conflict is. I imagine that is because AMX ads in some extra fields and Custom Fields sees them adds more data.
It isn’t a big deal though since AMX is basically antiquated in 2.7.
Thanks for the great Plugin!
Posted at 2009.01.19 5:36 am by Jake
Hello Hiroaki,
I’ve translated your great plugin in Italian! ;-)
Please, could you send me your email address? I will send you the ,po & .mo files
Thanks in advance
best regards
Gianni Diurno
PS
My wp-plugins translation works (sample) | http://gidibao.net/index.php/portfolio/
Posted at 2009.01.19 6:29 pm by Gianni Diurno
Hi Gianni,
Thank you for translating into Italian. Please send the translation files to webmaster[[at]]wordpressgogo.com . I will include it in the next release. I will also add a link to your site in the plugin page of wordpress.org. Thanks.
Posted at 2009.01.19 11:46 pm by Wordpress Go Go
Thanks for the great plugin. I am trying to use it for a dictionary, and I have been able to create the fields and the shortcut format. But when I place the codes into the post’s box (HTML) it shows the codes in the website instead of showing the proper result.
Here is the page: http://persianlanguage.us/ab/
What do I do that is not right?
Posted at 2009.01.20 6:36 am by sourena
Hi sourena,
I saw your site. [cft] shortcode format seems to be properly viewed but does not convert any keys to values. Hmmm, are you setting the template correctly? For example if you want to use [Usage] in the shortcode, you need to set [Usage] in the template.
`TEMPLATE #0
[Usage]
type = text
size = 30`
then,
`FORMAT #0
Usage = [Usage]`
[Usage] must be converted into the value of [Usage]. If the value is empty, it will be blank.
Could you confirm your template of the setting page?
Posted at 2009.01.20 11:06 am by Wordpress Go Go
Hello again!
I needed to sanitize the values of some fields, so I added a custom filter at line 1227.
Instead of this:
add_post_meta( $id, $title, $meta_value );I put this:
add_post_meta( $id, $title, apply_filters("cft_$title", $meta_value) );Then I added my filter like this:
add_filter('cft_my_field', 'my_function'));Hope you will include this in a future release.
Posted at 2009.01.21 7:43 pm by scribu
Hi scribu,
I am sorry for my late reply. I released the version of 1.0.1. Actually I did not add the `add_filter` you mentioned, because I added the functionality instead of it. It is the `editCode` option.
This is an example.
TEMPLATE #0
[Price]
type = text
size = 5
editCode = 0
CODE #0
$value = number_format($value);
If you put 1000000 in the `price` field, after saving it will be converted into 1,000,000. You can set any codes you want to do.
I hope this functionality will work in your situation. Thanks.
Posted at 2009.01.27 5:06 pm by Wordpress Go Go
I added this code and the values don’t change at all:
[aparat]
type = text
label = Aparat
editCode = 0
[film]
type = text
label = Film
editCode = 0
CODE #0
$value = $value.’xx’;
I still think a filter would be more elegant:
You can’t really have a code editor inside that box. You would still have to write and test that function inside a theme file or a separate plugin, so why not just let it live there?
The folks that are going to use this kind of feature probably know how a filter works anyway.
Posted at 2009.01.27 7:38 pm by scribu
veeery nice update. thanks for that.
Posted at 2009.01.27 7:39 pm by F J Kaiser
Hi scribu,
Did not your code work properly? Updated CFT into 1.0.1? Hmmm, in my situation it works. Because I would like to complete any kind of process about custom fields by using only this plugin, I added the PHP code option. But there might be some other users who want to use the filter functionality. I will consider to include this feature in the next release. Thank you.
Posted at 2009.01.27 9:03 pm by Wordpress Go Go
Yes, it works (I put the code in the wrong box).
Another thing I noticed: To save the fields, you do this:
add_action( 'edit_post', array(&$this, 'edit_meta_value'), 100 );
add_action( 'save_post', array(&$this, 'edit_meta_value'), 100 );
add_action( 'publish_post', array(&$this, 'edit_meta_value'), 100 );
I think this would be enough:
add_action( 'save_post', array(&$this, 'edit_meta_value'), 100 );
The ‘edit_post’ hook is called just before ’save_post’, which means that the function is called two times with no reason.
As for ‘publish_post’, I don’t think it even exists. (I did a search through all WP files for it and found nothing).
Posted at 2009.01.27 11:25 pm by scribu
You seem to be right! I took over the base from the rc:custom_field_gui plugin and have not checked it so far. I will change it in the next release. Thank you!
Posted at 2009.01.28 1:08 am by Wordpress Go Go
Hi there, thanks for this superb plugin!
I have just a question.
I want use the plugin to do exams.
Well, I can rate the student examen.
But (the question), I can save the post name (or id..) and the rate(a custom field) on the student (a user) account?
(The goal is some like a gradebook)
Posted at 2009.01.29 7:20 am by Carlos
Hi Carlos,
I am not sure what you want, but I supposed something like this.
Each post is an exam or an assignment. You need to make a student list by use of custom field templates.
TEMPLATE #0 — Class A
[Tom]
type = select
value = 0 # 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10
[Jeniffer]
type = select
value = 0 # 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10
.
.
.
Then you can rate students in each post. You may need to close the site only to teachers. Anyway let me know more questions. Thanks.
Posted at 2009.01.29 11:11 am by Wordpress Go Go
Hi, thank you.
I want know if I can have on every user (student) account a list with all post and rates from the user
(sorry I cannot explain me better in my “english”!)
Posted at 2009.01.30 2:07 am by Carlos
Do you want to show all of exams and student rates at a time? It depends on how to display the results from custom fields. I think you can do this by use of tables, but the custom field template plugin itself does not support the way. Probably you need to customize wordpress theme files like index.php ….
Posted at 2009.01.30 11:57 pm by Wordpress Go Go
I want (know if it’s possible…)the system (wordpress) save the id-quiz and quiz-rate for every quiz that a user do. No manually I’add it , but wordpress. An student do a quiz and wordpress save the id-quiz and id-points on the user account with all their quiz rates.
I hope I get this time to explain me better, thanks!
Posted at 2009.01.31 10:50 am by Carlos
Hi I would like to say:thanks a lot for this plugin,
it is wonderful: simple in its best meanings :-)
a friend would like to write about woman soccer – he can write – no html – no code, now he can type wonderful tables of results ;)
he is so happy about this
thanks for sharing your knowledge and your time
kindly regards
Monika (from Austria)
Posted at 2009.02.02 9:55 pm by Monika
Hi Monika,
I am glad to hear that. If you have some functionalities you want to add, please let me know. Thanks.
Posted at 2009.02.03 12:12 am by Wordpress Go Go
Hi Carlos,
I understood what you would like to do. I imagined how I could make it possible.
1. You provide wordpress accounts to students.
2. You make an exam by use of this plugin. Probably one exam is in one category and the template is limited to the category.
3. After students log in, they take the exam in each post, which means they make an post and input, check, and select the custom fields.
4. You need to write some codes to count, grade, and output the exams.
I think you want to know how to do the last. It depends on the detail you wish to do. If you pay for that, I will assist you to make the system. Let me know if you are interested. Thank you.
Posted at 2009.02.03 12:33 am by Wordpress Go Go
When updating the History for the plugin, could you identify what the bug fix actually refers to instead of just saying Bug Fix. Thanks.
Posted at 2009.02.03 12:42 am by Johnathan
You are right. I am sorry for my laziness. I will possibly write the detail of Bugfix specifically. If you are interested in which part exactly changed, see the trac page.
http://plugins.trac.wordpress.org/browser/custom-field-template/
Thanks.
Posted at 2009.02.03 12:50 am by Wordpress Go Go
Hi Johnathan,
thanks for your great plugin!
I just have one problem: I want to have a checkbox with values of all authors on the blog like this:
$query = $wpdb->get_results(‘SELECT meta_value FROM $wpdb->usermeta, $wpdb->users WHERE $wpdb->usermeta.user_id = $wpdb->users.ID AND $wpdb->usermeta.meta_key=`nickname`’, ARRAY_N); foreach ($query as $value) { $values[] = $value[0];};
[Test]
type = checkbox
code = 0
It works without problems in normal templates, but it breaks the editing page.
Do you have any suggestions, what I should change?
Thanks in advance and best wishes.
Posted at 2009.02.03 9:33 am by pampfelimetten
by templates I mean standard theme templates! it does NOT work in the cfp-templates!
Posted at 2009.02.03 9:35 am by pampfelimetten
I tried your code. I think you need to add `global $wpdb;` before the code. In my test, It works properly. Thanks.
Posted at 2009.02.03 12:11 pm by Wordpress Go Go
thanks!
works like a charm:
global $wpdb;
$query = $wpdb->get_results(“SELECT meta_value FROM $wpdb->usermeta, $wpdb->users WHERE $wpdb->usermeta.user_id = $wpdb->users.ID AND $wpdb->usermeta.meta_key=’nickname’ ORDER BY meta_value”, ARRAY_N);
foreach ($query as $value) {
$values[] = ucwords($value[0]);
};
Another suggestion: A Date-Picker would be great! This way, I could send my 2 year old rs-event plugin to hell =)
Posted at 2009.02.04 10:40 pm by pampfelimetten
BUG: If I log in with a non-admin user, the ajax function to load the template for certain categories only doesn’t work.
Posted at 2009.02.04 10:51 pm by pampfelimetten
こんにちは。いつもお世話になっております。
先日のバージョンアップより、カスタムフィールドテンプレートが 2.7 のクイック編集にも表示されるようになりました。
この機能追加は、時に非常に便利なのですが、実は私が設定しているカスタムフィールドテンプレート#0 が、何を血迷ったか 30 近くの項目数を持つため、クイック編集時のフォームがものすごく縦に伸びてしまうようになりました。
そのため「キャンセル」や「投稿を更新」のボタンまでページをかなりスクロールさせなければ到達できず、カスタムフィールドの値を修正しない場合のクイック編集が少し煩雑になってしまっています。
編集の頻度は、どんなユーザーでも大抵
通常の項目の編集 > カスタムフィールドの項目の編集
であると思いますので、出来ればプラグインの設定画面からクイック編集でのカスタムフィールドテンプレートの編集機能をオフに出来るようになるか、あるいはワンクッション置く、例えばクイック編集と同様に、何らかのリンク (ex. カスタムフィールドの編集) をクリックするとカスタムフィールドテンプレートのフォームが表示/非表示でトグルされるようになれば、大変ありがたいです。
それから、現状カスタムフィールドテンプレートは Tab キーによるフォーカスの移動が出来ませんが、カスタムフィールドテンプレートのフォームアイテムに tabindex 属性を設定できるようになるか、自動で設定されるようになると、これまたありがたいです。
何度も勝手なお願いをして大変恐縮ですが、もし上記のような機能について、次回以降のアップグレード・スケジュールのどこかで実装候補として検討して頂ければ幸いです。
Posted at 2009.02.06 2:52 am by mizube
Hi pampfelimetten,
I tried it as a non-admin account, but it seems to work properly. Could you tell me the account level and any addditional information about your situation. Thanks.
Posted at 2009.02.06 6:59 pm by Wordpress Go Go
mizubeさん、こんにちは。
1.0.4にてクイック編集を停止するオプションを追加しました。また次回にでも停止しないまでも、ワンクッション置かないとクイック編集が開始されないように変更してみようと思います。
tabindexの件も少し検討してみます。
Posted at 2009.02.06 7:01 pm by Wordpress Go Go
hi there,
current non-admin level is author, but no use changing it to editor either.
I’v tried deactiving all other plugins, also no success.
Which additional information may i Provide?
i use a german language pack, maybe thats a problem?
Posted at 2009.02.06 9:43 pm by pampfelimetten
Hi. Thank you for the plugin.
The latest version, I found a bug: when you select a category, which is pegged to the template, the template does not load, instead of his error: “Fatal error: Cannot redeclare class custom_field_template in / home / * / public_html/wp-content/plugins/custom-field- template / custom-field-template.php on line 31. ”
What could be the problem?
Posted at 2009.02.09 4:55 am by Denis
forgot to add that my WORDPRESS 2.7MU, the latest version.
Posted at 2009.02.09 5:26 am by Denis
Hi pampfelimetten,
I am so sorry for my late reply. Well, basically translation files do not affect the plugin. Are you using WP 2.7? Hmmm, I have no idea what is the cause….
Posted at 2009.02.11 11:55 pm by Wordpress Go Go
Hi Denis,
I tried the custom field template plugin in WordPress MU 2.7. It seems to work properly in my situation. After selecting a category, the template loads rightly. Hmmm, probably there are some causes somewhere….
Posted at 2009.02.12 12:05 am by Wordpress Go Go
Hi Hiroaki,
Thanks for creating this great plugin!
Just one tiny cosmetic request:
Can we use the value that we use for the “Template Title” instead of the default header “Custom Field Template” when we’re making a post?
Here’s a screenshot of what I mean:
http://img10.imageshack.us/img10/6437/cftscreenshotkf8.png
Thanks again for the great plugin!
Also I’d like to echo Ben’s request (http://wordpressgogo.com/development/custom-field-template.html#comment-1086) for infinite multiple fields of the same key.
That would be very useful!
Thanks again for the hard work!
Posted at 2009.02.12 3:40 am by Ray
Hi Ray,
I added the option to replace the box title with the template title in the latest version 1.0.5. Please try it out. I will consider the infinite multiple fields of the same key in the future release. Thanks.
Posted at 2009.02.14 4:11 pm by Wordpress Go Go
Hello again. I’m really lost here. No matter what I try, everytime I try to change templates when creating a page, I get this JS error and I no longer see the WYSIWYG editor or see the different fields in each template. This is the error that I get. I know I’ve reported this before, but I can’t seem to find the way to make it work :/
Error: uncaught exception: [Exception... "Cannot convert WrappedNative to function" nsresult: "0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)" location: "JS frame :: http://love2d.com/wp-admin/page-new.php :: onclick :: line 1" data: no]
Anyone?
Posted at 2009.02.16 10:44 pm by verowhite
Hello,
thank you for a wonderful plugin!
Unfortunately I can’t get the PHP-code (experimental option) to work. In my template I have
[day]
type = select
editCode = 1
and in code# 1 I have
$values = array(1,2,3,4,5,6);
$default = 1;
however, when i look at the resulting template my ‘day’ select only has the values ‘Select’ and ” (empty).
Could you document the usage of PHP CODE please? I would love to use it.
Thanks you,
Posted at 2009.02.16 10:56 pm by Erik
Hi verowhite,
If you do not mind making a temporary user of your wordpress, please send the id and password to webmaster[[at]]wordpressgogo.com . I will take a look the error and what is the cause. Thanks.
Posted at 2009.02.16 11:14 pm by Wordpress Go Go
Thank you so much! I just sent the email your way.
Posted at 2009.02.16 11:34 pm by verowhite
Hi Erik,
The attributes which PHP codes apply are `code`, `editCode`, and `outputCode`. In your case, you need to use `code` attribute. I just changed `editCode` to `code`.
TEMPLATE #0
[day]
type = select
code = 0
CODE #0
$values = array(1,2,3,4,5,6);
$default = 1;
`editCode` is applied before saving the values. `outputCode` is before showing the data by use of [cft]. This is an example.
TEMPLATE #0
[Price]
type = text
size = 5
editCode = 0
CODE #0
$value = number_format($value);
If you put 1000000 in the `price` field, after saving it will be converted into 1,000,000.
I hope these information will be useful.
Posted at 2009.02.17 1:53 am by Wordpress Go Go
Hi Hiroaki,
Thanks for implementing the box title option!
I have another feature request.
When a user makes a new post and checks off two categories which have two Custom Field Templates defined, is it possible to see both Custom Field Templates at once?
Right now, only one Custom Field Template is shown.
Thanks for reading!
-Ray
Posted at 2009.02.17 11:18 am by Ray
Yes, I was also thinking that it would be better to have each template in it’s own box, instead of selecting it from a dropdown.
Posted at 2009.02.17 7:27 pm by scribu
One bug I’ve encountered:
When using the Media Image Button for a custom field, I tried to use the “Add media file from URL” function, but instead of the image being inputted into the Custom Field, it gets added into the main post textarea.
Posted at 2009.02.18 4:14 am by Ray
Thanks a lot Wordpress Go Go! I figured out the ‘code’ part yesterday, and am pleased that I now also understand editCode and outputCode :)
I do agree with Ray, and Scribu. It would be useful to have each template in it’s own box, e.g. when a post has two categories and two different templates assigned to those categories.
Also, when binding a template to a category it works fine when you click the category if it is unselected. However, if you open a post with a particular category, the template assigned to that category doesn’t open by default.
Thanks for your answer!
Erik
Posted at 2009.02.18 5:52 am by Erik
Hi guys,
Thank you for your requests. I will try to make each template in its own box, but it may take time.
Hi Ray,
I tried `Add media file from URL` and inserted the link into the custom field template properly. Do you encounter it every time? Are there any specific settings you set?
Hi Erik,
About your last question, the category which you mentioned is the one which is set as `Default Post Category` in Settings – Writing? Actually, it does not appear by default after saving the post. I will also consider about this.
Posted at 2009.02.18 2:12 pm by Wordpress Go Go
Wordpress Go Go,
that’s the one I meant yes. When one adds a ‘Default Post Category’ in Settings – Writing, it would be really useful if that template (or set of templates when there are multiple categories) is/are opened by default when a saved post is edited again.
Thanks
Posted at 2009.02.18 6:49 pm by Erik
Thanks again for the great plugin!
I want to offer a checklist of already used keys called Location, and add the possibilty to add new Locations, which I try like this:
[Location]
type = checkbox
label = In welcher Location ist der Event?
code = 2 (gets the Locations)
[Location]
type = text
size = 70
label = Wenn es eine neue Location ist?
But currently, It gets mixed up, and isn’t showing a text input field at all.
Would be very cool, if this would work =)
If you have time, I could send you login data, so you can have a look.
Best wishes!
Posted at 2009.02.18 11:23 pm by pampfelimetten
Hi Hiroaki,
About the Media Image problem, it was an error in my part.
It seems to work now!
-Ray
Posted at 2009.02.19 1:21 am by Ray
Hi pampfelimetten,
I understood what you want to do. I wrote the following code. I know this is not a cool way, but it seems to work so-so.
TEMPLATE #0
[Location]
value = Somewhere
type = checkbox
label = In welcher Location ist der Event?
[New Location]
type = text
size = 70
label = Wenn es eine neue Location ist?
editCode = 0
CODE #0
preg_match(‘/(\[Location\]\r\nvalue = [^\r\n]+)/’, $options['custom_fields'][0]['content'], $matches);
if ( !preg_match(‘/’.$value.’/', $matches[1]) ) {
$options['custom_fields'][0]['content'] = preg_replace(‘/(\[Location\]\r\nvalue = [^\r\n]+)/’, ‘$1′. ‘ # ‘.$value, $options['custom_fields'][0]['content']);
}
unset($value);
Please be careful of `’` single quotation mark in the upper code. WordPress converted automatically.
If you need more help, send an email to webmaster[[at]]wordpressgogo.com . Thank you.
Posted at 2009.02.20 1:51 am by Wordpress Go Go
I feel a little silly asking this, but I’m having trouble with the shortcodes!
I currently have (in Template #0):
[Name]
type = text
size = 35
Do I call this value in my post template as [cft format=0] [Name]?
Posted at 2009.02.20 9:47 am by Jenn
Ok, disregard that last post, I figured it out. Thanks, this plugin saved me!!
Posted at 2009.02.20 10:23 am by Jenn
Hi,
I’m working from gadarian.com right now in order to get the site in shape….
I have a very basic question – I want to create a “source” field citing the publications – I have downlowded the plugin and it seems to work fine on my admin page, but I can actually get the data from the plugin to appear on my index page?
So for I’ve tried
as I want to include this in my loop… As I said this is a pretty basic question, but while I’m at it, can I add CSS into the Template Instructions panel, and if not where would you recommned I do this.
Thanks for all the effort in putting this together, and best of luck in your pursuits!
David G
Posted at 2009.02.21 3:41 am by David G
i figured it out – php the_meta(); seems to have been the answer i was looking for
Posted at 2009.02.21 5:08 am by David G
Hi Hiroaki,
I have another feature request.
For a textarea, if we use the tinyMCE area + htmlEditor, can we have an option to turn off Wordpress’ auto-formatting filter, wpautop?
Or if possible, maybe have it so if we have htmlEditor = true, that htmlEditor is automatically selected, instead of the visual editor.
The reason I ask is my HTML code for my main post area is being mangled when I enable tinyMCE + htmlEditor.
-Ray
Posted at 2009.02.21 9:30 am by Ray
Another request:
Right now, there’s a “break” type.
Would be nice if we could “clear” the columns and start a new 1-column [div].
What do you think?
Posted at 2009.02.21 11:21 am by Ray
Hi David,
You can add css for the template instruction at #cft_instruction in ADMIN CSS. In order to load the custom fields on the post, you can use the shortcode `[cft]` or `[cft format=0]`. If you want to use this in the template files directly, you need to call the function like this:
`$custom_field_template->output_custom_field_values(array(‘post_id’=>$post->ID, ‘format’=>0));`
Posted at 2009.02.22 10:20 am by Wordpress Go Go
Hi Ray,
There is the option to use the wpautop function. So if you uncheck `Use wpautop function` in the setting page, textareas do not save the values without wpautop. About the break type, I will add `class` attribute for the break in the next release, you will be able to set the css to clear the float. Thanks.
Posted at 2009.02.22 7:18 pm by Wordpress Go Go
非常に便利なプラグインですごく助かっています (^^)
1つ欲しい機能があり書かせていただきます。
編集画面で選択した”custom_field_template_select”の値を、single.php等から呼び出すことは出来ますでしょうか?
当初選択カテゴリーで表示する項目を調整していたのですが、複数カテゴリーを選択した際、if文の順番で表示される項目が変化してしまう状態になってしまいました。
編集画面で選択したものと連動するようにかければ、このような問題はなくなると思いどこかに情報が隠れていないか調べたのですが、自力では見つけられず・・・
ご教示のほどよろしくお願いいたします。
Posted at 2009.02.26 2:09 am by かとう
かとうさん、こんにちは。
いまいちやりたいことがよく分からないのですが、テンプレートの値をは以下で取り出せます。
`$options = get_option(‘custom_field_template_data’);`
カテゴリーと連動でテンプレートを読み込む機能は現在、1カテゴリーにつき1テンプレートなので、これはなんとかしたい(要望が結構あるようなので)と思いますが、忙しいのでなかなか、といった感じです。
ではではよろしくお願いします。
Posted at 2009.02.27 4:31 am by Wordpress Go Go
分かりにくい質問で申し訳ありませんでした。
頂いたご回答を参考にし、無事解決しました (^^)
細かい説明は抜きにして、sourceでご報告いたします。
ID]): ?>
あいうえお
かきくけこ
ありがとうございました m(_ _)m
Posted at 2009.02.28 5:51 pm by かとう
リトライ (^^;
<?php $cfto = get_option(‘custom_field_template_data’); ?>
<?php switch($cfto['posts'][$post->ID]): ?>
<?php case 0: ?>
あいうえお
<?php break; ?>
<?php case 1: ?>
かきくけこ
<?php break; ?>
<?php endswitch; ?>
Posted at 2009.02.28 5:55 pm by かとう
無事解決したようで何よりです。
また何かありましたらおっしゃってください。
Posted at 2009.03.01 11:04 am by Wordpress Go Go
Hi Hiroaki,
I think you have done a good job with this plugin, but I have a few questions. I looked for a usage guide, because I don’t know how to insert the form into the article page. It is very hard for me because I know just a little PHP.
Can you make a guide for that?
Thanks
Posted at 2009.03.03 8:02 am by Mihnea
Hi Mihnea,
There are several ways to insert custom fields into posts. I will explain how to do this by use of the custom field template plugin.
#1
Use the cft shortcode. In the edit post, write down just `[cft]`. If you would like to specify the post ID, `[cft post_id=15]`. You can also set the template ID like `[cft template=1]`.
#2
Do you want to insert a particular key value? This is a secret way:) Use `[cft key=Key_Name]`.
#3
If you set the format of the custom fields, use `[cft format=0]`.
#4
Auto Hook of `the_content()` in the option page of this plugin may help you do this. You can use [cft] shortcodes here. You can switch the cft formats in each category.
I wish you will find the way.
Posted at 2009.03.04 12:22 pm by Wordpress Go Go
Hi Hiroaki,
I think your plugin looks like it will solve my problem but I am very new to php and don’t know where to begin.
Basically I am using the Revolution Pro Business theme which provides the option to add a custom field with the Name: homepage linked to a url Value like this: http://yourdomain.com/wp-content/themes/revolution_business-10/images/thumbnail.jpg
I want to know if I can use your plugin to set the homepage custom field to appear on every single post as a default custom field so that I don’t have to go in and add it every time I post. Some of my posts are automated so this would make life a lot easier. Is this possible and if so could you please give me step-by-step instructions? I really appreciate your help.
Posted at 2009.03.06 5:23 am by Scarlett Cocoa
Hi Scarlett,
If you use Auto Hook of `the_content()` in the setting page, you can show the custom fields on every posts.
You can include [cft] shortcode in this field only before and after the content area. You can also restrict to the certain categories.
Another way to do this is to use php code directly. But it is a little bit difficult.
I do not have enough time to explain this, I will do it later on if you are interested in it. Thanks.
Posted at 2009.03.06 6:37 pm by Wordpress Go Go
Thanks very much for your prompt response. You don’t need to tell me how to do this with php but if you could just clarify how I complete the AutoHook settings I’d appreciate it. This is what I tried:
+ Auto Hook of `the_content()` (Experimental Option)
HOOK #0
Position:
After the conetnt
Category ID (comma-deliminated):
cat=6
Content:
name = homepage
value = http://mydomain.com/wp-content/themes/revolution_business-10/images/mypic1.jpg
Use PHP
HOOK #1
Position:
Before the conetnt
Category ID (comma-deliminated):
cat=1
Content:
name = homepage
value = http://mydomain.com/wp-content/themes/revolution_business-10/images/mypic2.jpg
Now this didn’t work, so I’m obviously doing something wrong and
I have no idea what to put into + [cft] and [cftsearch] Shortcode Format.
I also wondered, once the settings are correct, will this add the homepage custom field to every existing post as well as every future post or just future posts?
Many thanks again
Scarlet
Posted at 2009.03.06 8:54 pm by Scarlett Cocoa
カスタムフィールドテンプレートを利用させていただいております。素敵なプラグインをありがとうございます。
不具合とまでは言えませんが、カスタムフィールドテンプレートをカテゴリIDで表示する様に設定して新規投稿を選択した場合にカテゴリーIDに従ってカスタムフィールドが表示されますが、ブログにて記事が表示されている時に編集(Edit)で編集を行うとカスタムフィールドを表示する様にしていしたID以外でもカスタムフィールドテンプレートで指定したカスタムフィールドが表示されてしまいます。
何かのタイミングで対応して頂ければ幸いです。
それでは
Posted at 2009.03.09 6:58 pm by ねこ好き
OK, so I’ve been experimenting with this to try and get my head round how it works.
I’ve now filled out the TEMPLATE #0
Template Content with:
[name]
type = textfield
label = name
size = 30
default = homepage
[value]
type = textfield
label = value
size = 30
default = http://mydomain.com/wp-content/themes/revolution_business-10/images/mypic.jpg
and this brings up the correct custom field option when writing a ‘new post’.
however, what I want to do, is have this custom field automatically attach itself to every existing and future post.
I then went to Auto Hook of `the_content()` (Experimental Option)
and just typed in [cft]
but nothing happens.
I also edited [cft] and [cftsearch] Shortcode Format to read:
Name[Name]
homepage[homepage]
Value[Value]
http://mydomain.com/wp-content/themes/revolution_business-10/images/mypic.jpghttp://mydomain.com/wp-content/themes/revolution_business-10/images/mypic.jpg
but I’m quite lost now.
I really appreciate it if you could tell me what to put in the + [cft] and [cftsearch] format box and also the Auto Hook of `the_content()` Hook Content box.
I’m sorry to keep asking but I really want to learn how to do this.
Thanks
Scarlett
Posted at 2009.03.10 8:21 pm by Scarlett Cocoa
ねこ好きさんへ
お返事遅くなりました。さて、カテゴリーIDに関する動作ですが、恐らく一度カテゴリーと関連付けた後別のカテゴリーにして保存しても、前のカテゴリーに関連付けられていたカスタムフィールドテンプレートが出てしまう、ということではないかと思います。これはバグっぽいですね。近いうちに修正したいと思います。
Posted at 2009.03.11 4:29 am by Wordpress Go Go
Hi Scarlett,
About [cft], if you do not specify the format id, you need to add `output = true` attribute into fields in order to show the values. If you use [cft] Shortcode Format like `[cft format=0]`, you do not need add `output = true`. I noticed the field names of your shortcode format were different. They must be same entirely.
TEMPLATE #0
[name]
type = text
size = 30
[value]
type = text
size = 30
FORMAT #0
Name: [name]
Value: <a href=”[value]“>[value]</a>
HOOK #0
[cft format=0]
Posted at 2009.03.11 4:43 am by Wordpress Go Go
Thanks for trying to explain but unfortunately it still doesn’t work. I do understand your explanation but I don’t know if I was clear on the fact that the custom field already exists in the drop-down menu and is labelled ‘homepage’ – if I am writing a new post and choose ‘homepage’ from the custom field menu and then assign the value ‘http:…jpg’ then each post thumbnail shows up as I want it.
When I followed your instructions it just results in extra text in each post (HOME: VALUE:)
I have tried lots of variations on what you suggest but I am still not getting it.
Posted at 2009.03.11 6:51 am by Scarlett Cocoa
I am sorry I do not understand what you want to do well. You mean you do not want to input the thumbnail value like `http://blahblah/thumbnail.jpg` in each post directly and want to just select the variety name like `homepage`? How about this:
TEMPLATE #0
[thumbnail]
type = select
value = http://blahblah/thumb1.jpg # http://blahblah/thumb2.jpg # http://blahblah/thumb3.jpg
valueLabel = homepage # news # chocolates
FORMAT #0
<img src=”[thumbnail]” width=”100″ height=”100″ />
HOOK #0
[cft format=0]
Posted at 2009.03.12 3:33 pm by Wordpress Go Go
Hello,
Thank you for a great plugin.
But I have a problem. I’m using a custom field with a textarea and media buttons where you can upload an image directly into the field. My problem is that I need the output to be just the file-name, title or URL of the image. As it is now CFT generates an img-tag and since I’m using the image as background to a div in my theme and therefore can’t use the img-tag.
Is it possible to let CFT retrieve just the file-name, the title or the URL from an uploade image into a textfield?
Thanks,
Jonas, Sweden
Posted at 2009.03.12 6:15 pm by Jonas
Hi Jonas,
There may be something better way to get attributes of the img tag. This example may not work well in Firefox….
Template Instruction
<script type=”text/javascript”>
function srcMatch(val) {
var tmp = val.match(/src=\”([^\"]+)\”/);
return tmp[1];
}
function altMatch(val) {
var tmp = val.match(/alt=\”([^\"]+)\”/);
return tmp[1];
}
</script>
Template Content:
[img]
type = textarea
mediaButton = true
rows = 1
cols = 50
class = img
onchange = jQuery(‘.src’).val(srcMatch(jQuery(‘.img’).val())); jQuery(‘.alt’).val(altMatch(jQuery(‘.img’).val())); jQuery(this).val(”);
[src]
type = text
size = 40
class = src
[alt]
type = text
size = 40
class = alt
Be careful of quotation marks. You need the latest version of this plugin.
Posted at 2009.03.13 12:09 am by Wordpress Go Go
Hi Hiroaki,
Thanks for implementing the class attribute for the “break” type!
I have found that in order to have multiple “breaks” in the template, you need to specify a different key in order for the template to render it properly.
eg.
[Any1]
type = break
class = col
[Any2]
type = break
class = col
[Any3]
type = break
class = clear
—
This is very minor, but is it possible to use just one key for all breaks?
Thanks for great, consistent updates!
-Ray
Posted at 2009.03.13 10:53 am by Ray
Hi Hiroaki,
Me again!
One other thing:
If we have multiple values of the same key, when I save the entry, the plugin automatically sorts the values by ascending.
I, then, have to re-enter the values again and save it.
Then, the values stick in the same place.
—
Is there an option to keep the values in the same order we enter them in?
Posted at 2009.03.13 1:23 pm by Ray
こんにちは。
とても使いやすいプラグインで、一発で気に入ってしまいました。
ところで、検索機能の使い方がよく分からないのですが、教えていただけないでしょうか。
例えば検索対象の[key]に
search = true
を入れても「お探しのキーワード ‘’ では該当ありませんでした」と出てしまい、うまく検索されないのですが、他にどのような設定が必要なのでしょうか?
Posted at 2009.03.13 6:31 pm by tokki
Hello again Hiroaki,
And thank you for your answer (http://wordpressgogo.com/development/custom-field-template.html#comment-2181). But I’m not getting it to work, are you sure everything is correct? What do you mean with “Be careful of quotation marks”?
Posted at 2009.03.13 7:01 pm by Jonas
Hi Ray,
Thank you for reporting. I will consider the problems with the same key you reported in the future release. It may take time. So please be patient.
Posted at 2009.03.13 7:14 pm by Wordpress Go Go
tokkiさん、
検索オプションに関してはまだ開発中なので、オフィシャルなサイトでの使用には気をつけていただきたいのですが、簡単に使い方を書くと以下のとおりです。
[cftsearch]
の場合はフィールドに`search = true`が必要です。
[cftsearch format=0]
の場合はFORMATに指定したフィールド[key]が検索フォームとして利用できます。基本的にこちらの利用をお勧めします。
色々と隠しオプションを用意しているのですが、また時間を見つけてマニュアルを作りたいと思っております。
Posted at 2009.03.13 7:24 pm by Wordpress Go Go
Hi Jonas,
My WordPress converted single and double quotation marks into Japanese characters. So when you copy the code, you need to change them to English quotation marks. I am sorry for bothering you.
Posted at 2009.03.13 7:27 pm by Wordpress Go Go
Thanks for the plugin which looks to be one of the most useful once everything is implemented. I’ve had some trouble getting the fields to show how I want. I now use another plugin to show the fields (custom fields shortcode) but would like to do away with this. Unfortuantely when using your shortcode I have to show all the fields and their labels and I can’t format them properly. Only an opening instance of [cft] brings them all up otherwise if I repeat this it repeats all the fields. With the customs fields shortcode each field is wrapped in the delimiters of [cf][/cf] and then can be formatted accordingly. Is this a bug. The Format template doesn’t seem to work at all.
Posted at 2009.03.15 5:00 pm by Nigel
I have not tried the Custom fields shortcode plugin, but the custom field template plugin already provides almost the same functionality. Here is how to use it:
1. basic
[cft key=key_name]
2. if you want to get the single value
[cft key=key_name single=true]
3. if you want to specify the post id
[cft post_id=35 key=key_name]
Please try it out. I hope this will help you.
Posted at 2009.03.15 5:31 pm by Wordpress Go Go
ご返答ありがとうございます。
[cftsearch format=0]
でやってみたのですが、やはり
「お探しのキーワード ‘’ では該当ありませんでした」
と出てしまうんです。。。
私のやり方がどこか間違っているのでしょうか・・・
>色々と隠しオプションを用意しているのですが、また時間を見つけてマニュアルを作りたいと思っております。
マニュアルがあるととても助かります。心待ちにしております!
Posted at 2009.03.16 2:11 am by tokki
Suggestions:
1-) In the option:
“In case that you would like to forbid to use the default custom fields.:
Disable the default custom fields”
To hide (disable) only the fields that already appear in Custom Field Template, but to continue showing the other personalized fields and also the option to add new personalized field.
2-) And to allow to add for Custom Field Template personalized fields that were already created.
Posted at 2009.03.17 9:40 am by Newcos
Are you available for hire? I would like to use the Custom Fields plugin as the basis for a specific plugin that requires additional customization beyond what you have created. Would you be interested in providing me with a quote to do the work? Please contact ASAP at the email address provided on my comment.
Posted at 2009.03.18 4:29 am by Jeff Raab
以前ちょっとおかしな動作があった旨報告いたしましたが1.1で直っている事を確認しました。ありがとう御座います。
また細かい動作でちょっとおかしい部分を発見しました。実際の利用では問題がありませんが何かの機会にご確認頂ければ幸いです。
カスタムテンプレートフィールドのテンプレートコンテンツに、
[TotalScore]
type = select
value = ☆☆☆☆☆ # ★☆☆☆☆ # ★★☆☆☆ # ★★★☆☆ # ★★★★☆ # ★★★★★
default = ☆☆☆☆☆
label = 総合評価
の様な記載をします。デフォルトで☆☆☆☆☆が総合評価として記事を作成する時に表示されます。
またダッシュボードのカスタムフィールドテンプレートから表示するカテゴリIDを指定します
そうすると記事の作成で指定されたカテゴリIDのカテゴリが指定(チェック)された場合にこのカスタムフィールドが表示されます。
この時、記事のタイトルと本文を書いた後に記事のカテゴリをチェックした時、デフォルトで指定されている項目(この例では☆☆☆☆☆)がデフォルトで表示されず「選択して下さい」と表示されます。
最初にカテゴリをチェックした時は指定したデフォルトが正しく表示されます。
環境はローカルですので全ての環境で再現されるかまでは確認していません。
以上ご参考になれば幸いです。
Posted at 2009.03.18 1:48 pm by ねこ好き
Hi Newcos,
Thank you for your suggestions. I will consider to add your request in the future release. Thanks.
Posted at 2009.03.19 1:09 am by Wordpress Go Go
Hi Jeff,
I sent E-mail to your gmail address. Have you got my reply? I am looking forward to your offer. Thanks.
Posted at 2009.03.19 1:11 am by Wordpress Go Go
ねこ好きさん
どうもこんにちは。デフォルトの値の問題ですね。これは以前から指摘されていて、なんとかしようとは思っているのですが、後回しにしておりました。近いうちに対策を講じようと思います。
Posted at 2009.03.19 1:13 am by Wordpress Go Go
Hi,
Could you explain how I can use the values of a radio list (defined by means of your custom field template) in my php code of single.php?
Thanks
Posted at 2009.03.20 7:30 pm by Hansl Kerstens
Thanks for your clarification of using shortcodes earlier. This works better and I will substitute this for the alternative. Is it your intention to make Custom Fields searchable? Is that the object of the ’search’ key? Can you give some examples? Thank you.
Posted at 2009.03.21 8:49 pm by Nigel
Hi Hansl,
I am sorry for my late reply. I am not sure what you want to do, but if you use meta values in single.php, you can use the `get_post_meta` function. See this:
http://codex.wordpress.org/Using_Custom_Fields
Posted at 2009.03.24 10:28 pm by Wordpress Go Go
Hi Nigel,
The custom field template plugin provides the functionality to search custom field values. However, I have not explained how to use it well. Currently I am writing the manual. So please wait for it. Thanks.
Posted at 2009.03.25 1:03 am by Wordpress Go Go
Hello, I’ve added a patch that I hope you’ll include in a future release:
http://plugins.trac.wordpress.org/ticket/966
Posted at 2009.03.26 1:42 am by scribu
Hi Scribu,
Thank you for your suggestion. I tried not to waste the meta_id so much in the version 1.1.2. Please check it out. Thanks.
Posted at 2009.03.26 6:42 pm by Wordpress Go Go
Yeah, the meta_id was the main reason why I made that suggestion. Thanks.
Posted at 2009.03.26 7:47 pm by scribu
はじめまして。
Custom Field Template pluginを試させていただいております。
不明な不具合にぶつかっておりまして、質問させていただきました。もし何かご存知なところがございましたらご返答いただければ幸いです。
プラグインを有効にして、カスタムフィールドの入力項目を一つでも設定すると、投稿を書いてプレビューをした時に「Array」というタグが追加されて勝手にしまうのです。私の環境だけでしょうか。
ちなみに、プラグインの設定画面で「オプションを削除する」を押して、入力項目を一つも作らない状態だとこの現象は起きない状況です。
WordPress2.7.1で試しています。
設定の仕方かなといろいろ試してみたのですが、解決できず…。お手数ですがどうぞよろしくお願いいたします。
Posted at 2009.03.27 2:38 pm by KOSUKE,Nakamura
どうもこんにちは。
[キー]にcontentを指定していませんか?
contentやpost_titleはWordPress本体のフィールド名で使われていて、重複してしまいます。
近いうちになんとかしようとは思っているのですが、とりあえず確認してみてください。
ところで、なかなか面白いウェブサイトですね。
不思議な感じでした。
Posted at 2009.03.27 4:04 pm by Wordpress Go Go
お返事ありがとうございます。わざわざサイトまでご覧いただきありがとうございました。今、WPとFLASHと絡ませたいなぁと模索しています。何かFLASHでできたら紹介しますね。
なるほど。念のため確認させてください。
キーですが、このページの使い方のサンプルを参照した場合、
—————————-
[Plan]
type = text
size = 35
label = Where are you going to go?
—————————-
でいうところの、[Plan]の部分で間違いないですよね。
この前提で今、以下のことを確認してみました。
試しに全てのエントリーを削除して、すべてのタグを削除しました。次にCustom Field Template pluginの設定から「 オプションを削除する」を押してテンプレートを空にしました。そして、テンプレートコンテンツには
—————————-
[AIUEO]
type = text
size = 35
—————————-
とだけを定義してみました。
これで新規投稿画面から、タイトルだけ入力(ちなみにタイトルと入力)してプレビューを押してみたのですが、やはりプレビュー画面にタグ「Array」が表示されまして、タグのコントロールパネルにも「Array」が追加されてしまいました。
私の行ったオペレーション自体は期待通りでしょうか。
Posted at 2009.03.27 5:03 pm by KOSUKE,Nakamura
タグにArrayと表示されているんですか。
見落としておりました。
WordPressのバージョンはいくつでしょうか。
また、タグに関連したプラグインを何かお使いではないでしょうか。
こちらの環境では再現できないので何とも言えないのですが、上記の件、確認してみてください。
Posted at 2009.03.27 5:42 pm by Wordpress Go Go
たびたび、ありがとうございます。
そうですか。環境をお伝えしますね。
WordPressは2.7.1を使っています。
検証はサーバー環境で行っているのですが、専用のディレクトリを新設して本日クリーンインストールしました。プラグインはCustom Field Template pluginのみです。
で、今、試していて新しい状況が…。
もう一度、投稿とタグを削除して、先ほどとまったく同じオペレーションをした時に、プレビューでなく、「公開」を押すと「Array」タグは表示されないです。コントロールパネルのタグにも追加されませんでした。
「下書きとして保存」をおして「公開」を押しても同様に追加されないです。
この記事を再編集して「プレビュー」を押すとプレビュー画面に「Array」が表示され、コントロールパネルに「Array」が追加されます。ただしこの状態から再度「公開」を押しても記事そのものには「Array」タグは付かないです。
私の方だけで起きている問題かもしれません。
また何か新しいことがわかったら報告しますね。
Posted at 2009.03.27 6:05 pm by KOSUKE,Nakamura
再現できました。どうもバグっぽい気がします。
ちょっと調べてみようと思います。
報告どうもありがとうございます。
Posted at 2009.03.27 6:17 pm by Wordpress Go Go
了解です。
アップデート期待して待ってますね!
ありがとうございました。
Posted at 2009.03.27 6:30 pm by KOSUKE,Nakamura
Hi Hiroaki,
Great plugin.
I have a question. The plugin comes with a default template 0 installed. I would like to create two more templates that will be already installed too.
I have created many custom fields for a granite stone website, and now many other friends are asking me to build the same thing for them. Instead of spending time recreating the custom fields in all of their sites; I would like to create extra templates inside the plugin core and so as soon as I install the plugin it will be there.
Let me know if this is possible, how? and if there is any drawbacks doing that.
Thank you very much.
Posted at 2009.03.29 6:05 pm by Harris
Hi Harris,
I added the export and import functionality in the version 1.1.3. So you can export your options and import it to other wordpress. Please try it out. Thanks.
Posted at 2009.03.31 8:59 pm by Wordpress Go Go
先日動作で質問をしました「ねこ好き」と言います。さっそく対応をして頂き、ありがとう御座いました。
まだ実験的な実装部分の質問なので差し支えの無い部分でアドバイスを頂ければ幸いです。
現在DVDの一覧を管理するページを作っています。カスタムフィールドテンプレートで総合評価とそれぞれの項目に対しての評価をselectを使って指定する様にしています。テンプレートコンテンツは以下の感じで作成しています。
TEMPLATE #0
[TotalScore]
type = select
value = ☆☆☆☆☆ # ★☆☆☆☆ # ★★☆☆☆ # ★★★☆☆ # ★★★★☆ # ★★★★★
default = ☆☆☆☆☆
label = 総合評価
[Item1]
type = select
value = ☆☆☆☆☆ # ★☆☆☆☆ # ★★☆☆☆ # ★★★☆☆ # ★★★★☆ # ★★★★★
default = ☆☆☆☆☆
label = 項目1
[Item2]
type = select
value = ☆☆☆☆☆ # ★☆☆☆☆ # ★★☆☆☆ # ★★★☆☆ # ★★★★☆ # ★★★★★
default = ☆☆☆☆☆
label = 項目2
[Distributor]
type = select
code = 0
label = 発売元
ここでDistributorを指定する部分はPHPコードを以下の様に指定しています。
CODE #0
$values = array();
$links=get_bookmarks(‘category_name=発売元’);
foreach($links as $link)
{
array_push($values, $link->link_name);
}
リンクとして登録されているデータからリンクカテゴリが発売元として登録されている一覧を作成してSelectボックスに表示をさせる様にしています。
またカスタムフィールドテンプレートのショートコードは以下の様に指定しています(PHPを使用するにチェック)。
総合評価[TotalScore]
項目1[Item1]項目2[Item2]
発売元
ここで利用しているPHP関数、show_distributor()はリンク名とリンクURLを表示する様な自作関数となっています。ここまでは予想通り正しく動作しています。
ちょっと前置きが長くなってしまいましたが質問です。
1.cftsearchで検索範囲をある投稿カテゴリに限定する方法はあるのでしょうか。検索を行うと投稿やページ全てが検索対象となってしまいます。
2.上記で示した設定の場合Distributorをcftsearchでドロップダウンリストの検索項目に表示させる事ができません。ダイナミックに値を取得しているので難しいとは思いますが何か方法はありますでしょうか。
以上お判りになる範囲でアドバイスを頂けると嬉しいです。
それでは
Posted at 2009.04.02 1:33 pm by ねこ好き
投稿の時にHTMLコードを入れてしまい一部うまく投稿できませんでした。大変失礼しました。上記コメントで,
show_distributor()
と言う関数は発売元のリンク登録名にURLをハイパーリンクとして設定する関数で
総合評価[TotalScore]
項目1[Item1]項目2[Item2]
発売元 show_distributor()
と言う感じで利用しています。
大変失礼しました。
Posted at 2009.04.02 1:36 pm by ねこ好き
とても便利に利用させて頂いてます。
wordpressをインストール先以外のアドレスで運用する予定でいるのですが、テストを行ってみましたところカテゴリ指定で使用すると、新規登録の際に該当カテゴリにチェックを入れても内部サーバエラーとなりフィールドが表示されませんでした。
ホイール画像までは表示されるのですが消えた後もそのまま反応なし、という感じです。
インストール先と同じアドレスでの使用では問題がなかったのですが、この場合はどういった対処をすればいいでしょうか。
よろしくお願いします。
Posted at 2009.04.03 6:56 pm by tamm
内部サーバエラーの件ですがプラグインの再インストールで解決しました。
失礼しました。
Posted at 2009.04.04 2:20 pm by tamm
ねこ好きさん
どうもお返事遅くなりましてすみません。
なかなか忙しくてマニュアルができておりません。
カテゴリを絞り込む方法はあります。
FORMAT #0に以下を加えてください。
<input type=”hidden” name=”cftcategory_in[]” value=”3″ />
valueにカテゴリーのIDを入れます。
検索項目をコードで動的に作成する方法は今のところ用意できてないので、近いうちに実装しようと思います。
それではよろしくお願いします。
Posted at 2009.04.06 1:11 pm by Wordpress Go Go
Wordpress Go Go様
お忙しいのに回答を頂き、ありがとう御座います。さっそく試させて頂きます。
本当に良いプラグインをありがとう御座います。
Posted at 2009.04.06 4:33 pm by ねこ好き
Hi, thanks for that plugin.
However, I have upgraded to 1.1.6 today and I can’t activate the plugin anymore.
Fatal Error on Line 1740 (unexpected $end)
Posted at 2009.04.07 2:09 pm by Basti
Hi Basti,
I have not seen the error. Could you try to reinstall the plugin?
Posted at 2009.04.07 3:14 pm by Wordpress Go Go
Hi, Is it possible to have HTML and PHP code as the value? I’ve tried many things and it doesn’t seem to work. I’m trying to use a custom field within a custom field, if that makes sense. I want to have ‘r7-score’ show up if ‘r7-show’ is marked ‘yes’ and nothing to show up if it’s marked ‘no’. But it doesn’t seem to be passing the PHP code correctly.
For example:
[r7-show]
type = select
value = # ID, r7-score, true); ?>
valueLabel = No # Yes
Any help would be appreciated. Thanks.
Posted at 2009.04.12 11:15 pm by Jordan Lyall
I do not understand properly what you want to do, but how about the following code?
Template Content
[r7-show]
type = select
value = yes # no
onchange = if(jQuery(this).val()==’yes’) jQuery(‘.r7-score’).show(); else jQuery(‘.r7-score’).hide();
[r7-score]
type = text
size = 10
class = r7-score
Admin CSS (add)
.r7-score { display:none; }
Please try it out.
Posted at 2009.04.13 8:21 am by Wordpress Go Go
When I use YARP (related post plugin) it shows the cft refs as part of the post reference (which is set to show some of the text – obviously I can show no teasers but I would like to if possible). Is there any way around this?
Posted at 2009.04.14 9:34 pm by Nigel
I love this plugin. It’s saved my sanity. One thing I do need it to do, though, is show a drop-down list for selecting all posts in X category. Someone else asked the same question, and I’ve been trying to follow your instructions in that response.
It keeps erroring out on me, though. (I’m using 2.7.1, btw.) Currently I have the code set up as:
$value = array();
$posts = get_posts(’category=303,458,459′);
foreach($posts as $post) {
$values[] = $post->post_title;
}
and I get:
Parse error: syntax error, unexpected ‘=’ in /domaininfo/custom-field-template/custom-field-template.php(1259) : eval()’d code on line 1
Is there something I’m missing? I’m on PHP5, and using the most recent ver of CFT (I’m pretty sure, at least).
Thanks again, all your hard work is greatly appreciated!
Posted at 2009.04.18 3:46 am by kaigou
Hi Nigel,
I am not familiar with YARP. I do not understand what and where are shown if you use both plugins. Could you explain more detail?
Posted at 2009.04.18 8:32 am by Wordpress Go Go
Hi kaigou,
There may be something errors in your code. I suggest a few things.
$value = array();
must be
$values = array();
You also be careful of quotation marks. This wordpress converts them into Japanese quotation marks.
Please check it out.
Posted at 2009.04.18 8:41 am by Wordpress Go Go
good call! idiotic moment over here: I’d caught one apostrophe, but missed the other — and now it works. AWESOME. Thank you!
Posted at 2009.04.18 1:30 pm by kaigou
Can you please contacting me about extending this plugin to include a date selector. How much would this cost?
Posted at 2009.04.19 9:17 pm by David Heacock
Hello! This contribution is awesome. Thank you very much for sharing!!!
I was wondering if there is anyway to put a condition if there is a Field with no data (null) then don’t display it.
This is a simple PHP sample i picked up from the internet:
if ($values == ‘NULL’) {
echo(“”);
} else {
echo(“Hello”);
}
Anyone any idea?
Posted at 2009.04.21 11:52 pm by Eddie
フィールドの追加ができるようになったんですね!すごくほしかった機能です!
よろしければ各属性の使い方を教えていただけませんでしょうか?
ちなみに、ひとまず下記のままためしてみたところ、textfieldは追加ボタンクリックでフィールドを追加できるようになったのですが、textareaには追加ボタンが出てこず、フィールドが追加できませでした。
multiple = true
startNum = 5
endNum = 10
multipleButton = true
Posted at 2009.04.23 3:47 pm by k-iweb
↑の者です、何度も質問ばかりすみません。
同名のキーが1つしかない場合は、従来のやり方で呼び出せたのですが、フィールドを追加して、複数入力した場合に、「Array」と表示されてしまいます。おそらく値が1個の時は文字列、複数の時は配列になるためだと思うのですが、どちらのケースも想定される場合、どのように呼び出せばばよいでしょうか?
Posted at 2009.04.23 4:06 pm by k-iweb
どうもこんにちは。
この3つはサーバー側の処理で管理する部分です。
multiple = true
startNum = 5
endNum = 10
フィールドを増やしていきたい場合は、multiple = trueを
指定すると、自動的にフィールド+1表示されます。
startNumはフィールドの開始数、endNumはフィールドの
最大数です。
multipleButton = true
これはJavaScriptで追加するボタンを表示するオプションですが、
残念ながらtextareaはまだ対応していません。
tinyMCEがらみで少し面倒なことになるので、後回しです。
ちなみにcheckboxも同様です。
オプションリストを見ていただけると、
どの項目が使用できるのかわかると思います。
「Array」と表示されるのはフィールド入力欄にでしょうか。もう少し具体的なテンプレート設定を教えていただけると確認できると思います。
それではよろしくお願いします。
Posted at 2009.04.23 4:18 pm by Wordpress Go Go
瞬時にご解答いただきありがとうございます!
Arrayと表示されるのは以下のテンプレートで出力した場合のHTMLに、値ではなく「Array」と出力されます。
ほんとにプログラム音痴なのでめちゃくちゃかもしれないです。。。
ヘッダ(head)と本文(p)はワンセットです。
<?php
$head = post_custom(‘head’);
$p = post_custom(‘p’);
foreach ($head as $head) {
print “”.$head.”";
print “”.$p.”";
}
?>
▼HTML
2個目ヘッダ
Array
1個目ヘッダ
Array
細かいですがフィールドを追加した時、上に追加されていきますが、下に追加することはできますでしょうか?
Posted at 2009.04.23 4:51 pm by k-iweb
Hello from Madrid, very nice work this plugin!
I have a problem with post quick-edit wordpress function and Custom Field Templates: Spanish accent and special caracteres move… is it a bug?
Have a good day!
Posted at 2009.04.23 10:51 pm by Bruno BAGOT
カスタムフィールドの使い方については、
http://wpdocs.sourceforge.jp/Using_Custom_Fields
ここあたりを見ていただければと思います。
また、配列については
http://jp2.php.net/manual/ja/language.types.array.php
PHPのマニュアルを参照いただければと思います。
サンプルがいくつかのっていると思うので参考にしてください。
Posted at 2009.04.24 3:14 am by Wordpress Go Go
Hi Bruno,
What do you mean “Spanish accent and special caracteres move”? Could you show me the screenshot or explain more detail? Thanks.
Posted at 2009.04.24 3:16 am by Wordpress Go Go
Re related posts characters (see above) clarification
When one uses a plugin to display related posts with an excerpt, (one can just have the title shown which is what I am currently doing), the shortcodes [cft] show up in the excerpt when one is using your excellent plugin. e.g. title might be Hello! article extract would then show: [cft]This is the introduction etc etc etc.My question was is there any way one could avoid this?
Posted at 2009.04.24 3:41 pm by Nigel
Hey,
I really like this plugin!! Great work!
Just wondering if it is possible to hide the title and shortcode if that option in the custom field template is not filled in. Eg I am using it for addresses, but would like it to hide an option on the website if they have no website, email, phone number etc. Any ideas?
Posted at 2009.04.28 7:39 am by Stacey
Hello again!
You should move all javascript to an external .js file, for faster loading.
For example, the “Initialize” button:
Instead of using onClick=”", you should just assing it an id and use jQuery’s click() function.
Keep up the good work :)
Posted at 2009.04.28 11:40 pm by scribu
Hello,
first of all thank you for this great plugin!
I would like to ask one question regarding image captions – is it possible to use image captions for images in custom fields? When added them the WP media uploader generated the caption shortcode and that was then not converted to HTML in the post. Any ideas how to achieve this?
Thank you.
P.S. If possible reply to my email as its quite urgent. Thank you.
Posted at 2009.04.29 10:47 pm by Erik Gyepes
Hello Bruno,
I’m using this module for a Spanish language website too and I haven’t had a problem with it. Something I have to note is that I changed my template’s header.php to change the header tag and hard coded the Content Type section to:
See if that works for you.
Eddie.
Hola Bruno. También estoy usando este módulo para un website en español. A lo mejor lo único que necesitas es modificar el header.php de tu Tema. Yo cambie el códgido del ‘Content-type’ manualmente para que fuera:
Esta puede que sea la solución.
Saludos.
Eddie.
Posted at 2009.04.30 1:38 am by Eddie
Hi Nigel,
Thank you for reporting the bug. I probably fixed it in the latest version 1.2.3. Please check it out. Thanks.
Posted at 2009.04.30 12:09 pm by Wordpress Go Go
Hi Stacey,
You mean the frontend display of meta values? It depends on how you make them show. Anyway, you need to add some php code to distinguish the existence of values.
Posted at 2009.04.30 12:12 pm by Wordpress Go Go
Hi scribu,
Thank you for your suggestion. I will consider about it in the future release.
Posted at 2009.04.30 12:13 pm by Wordpress Go Go
Hi Erik,
It is probably possible to use image captions for images in custom fields. You may overwrite the caption shortcode to achieve your demand. See the following:
http://codex.wordpress.org/Shortcode_API
Posted at 2009.04.30 12:18 pm by Wordpress Go Go
Hi Go Go, thank you for reply. I solved it yesterday with do_shortcode, for example:
echo do_shortcode(get_post_meta($post->ID, ‘image_column’, true)); and then it worked
Posted at 2009.04.30 6:59 pm by Erik Gyepes
Re Related Posts plugin (YARPP)> This now works fine. Thanks, Great work.
Posted at 2009.05.01 6:18 pm by Nigel
Hi Guy’s,
I’m experimenting with this plugin and it looks very promising Thank You Very Much !! , One question though. Is there a search plugin thats able to search my created custom fields.
Any advice would be appreciated.
Thank You
Kindly
Posted at 2009.05.02 4:38 pm by Michael Montgomery
Hi Hiroaki,
I’ve encountered a problem with the main “HTML” entry tab and a custom textarea tinyMCE field.
The problem is I cannot change the main post entry “HTML” tab to the “Visual” tab when I have a custom textarea field with “tinyMCE = true”.
Do you encounter this or is it just me?
Thanks for all the great work!
-Ray
Posted at 2009.05.03 9:26 am by Ray
Hi Michael,
Search options are already included in this plugin. Because of the experimental functionality, I have not disclosed how to do that in detail yet. I do not have enough time to write the manual recently. I am sorry about that. Anyway, here is the basic explanation.
#1: to show the search box
— specify the template ID and need `search = true`
[cftsearch template=0]
— use the format ID (recommended, do not need `search = true`)
[cftsearch template=0 format=0]
— change the search button label
[cftsearch template=0 search_label='Search!!']
— use your original button
[cftsearch template=0 format=0 button=false]
#2: to limit in the specific category
— use the format and add the following
<input type=”hidden” name=”cftcategory_in[]” value=”3″ />
#3: to exclude the specific category
— use the format and add the following
<input type=”hidden” name=”cftcategory_not_in[]” value=”3″ />
#4: to control the post number
— use the format and add the following
<select name=”limit”>
<option value=”10″>10</option>
<option value=”20″>20</option>
<option value=”30″>30</option>
</select>
Well, there are additional functionalities, but please try it out anyway. Thanks
Posted at 2009.05.06 1:54 am by Wordpress Go Go
Hi Ray,
Does it happen in every time? Let me know your detail info, something like browsers, os, version of wp, etc. Thanks.
Posted at 2009.05.06 1:58 am by Wordpress Go Go
Hello,
It’s me again :)
I’m working on other project where I’m using Custom Field Template (I love this plugin :-p), but I’m encountering the same/similar issue as Ray.
Sometimes it RANDOMLY happens that I cannot switch from Visual to HTML tab or vice versa. Also sometimes the posts is not updated when I click on “Update”, but rather the previous version is loaded. (which is really weird after you typed a long text in the editor)
I’m working in Firefox and Mac OS X, here is a short video of the problem: http://tinyurl.com/cccnem
Also here is the CF template I’m using: http://pastie.org/470592
Do you have any ideas what can cause this?
Once this will be fixed I will surely donate to this plugin as I will use it on my next projects as well!
Thank you.
Posted at 2009.05.07 7:47 am by Erik Gyepes
Hi Erik,
Thank you for reporting the bug. I confirmed it happened after choosing HTML mode and saving the post. I probably fixed it in the latest version 1.2.4. Please try it out. Let me know if there are still bugs. Thanks.
Posted at 2009.05.11 6:07 pm by Wordpress Go Go
Does anyone have a decent tutorial with examples? I see the the utility in this plugin, but I need to “see” it in someone’s template with a little explanation.
Where’s the “for dummies” version of this?
Posted at 2009.05.15 4:13 am by Jay
I do believe I have found a bug. I am using CFT 1.2.4.
I have a textfield that uses a default value and “code = 0″. I have the PHP Code #0 setup to set $value to an arbitrary string. However, when I load the template, the value being set in Code #0 is not being used. Instead, I see the default value that is set in the template. (If there is no default value set in the template, the textfield is set to an empty string).
So, I dug into the code to see what was going on.
In the make_textfield function, the code that evals Code #0 is immediately followed by an if/else block that will always set the value to some post_meta value or to the default value. The value set in Code #0 is always replaced.
I moved the code eval block after this if/else and things seem to be working as I expected them to.
Posted at 2009.05.17 8:04 am by Dereck
edit: A less-obtrusive workaround is to set the $value in Code #0 and then to set $default = $value at the end of Code #0. Technically, $default gets used instead of $value, but since they’re the same value there’s no noticeable difference.
Maybe this was the intended functionality?
Posted at 2009.05.17 8:12 am by Dereck
I went from 1.2 to 1.2.5 and discovered that randomly the is not recognised, therefore not performed. As I said it is totally random, so I had to get back to 1.2 as the same bug is also in 1.2.6.
But it’s a great plug!!
Lodewijk
Posted at 2009.05.26 7:42 pm by Lodewijk Bos
Hi there!
Is there any way I can specify the custom field template to show only on that specific page?
Lets say I created a CFtemplate only for the “product’s page” and would like this CFtemplate to be available to load or better, loaded only when the “product,s page” is accessed.
What is the purpose of: “post type” and “category id” in the CTF settings?
Thank you very much for this plugin.
Posted at 2009.05.28 3:22 pm by Harris
Just wanted to say your plugin is awesome!!
Posted at 2009.05.30 8:09 am by trish
Hye,
I think that your plugin is THEsolution for my site but I don’t know how to use. I’m searching documentation about this plugin, where I can find this ? What is all this option ?
I tryed on my website but when I’m saving with custom field, I delete the post !!! It’s strange, I keep the custom field but I loose all what I wrote in the post,
can you help me ?
Julien
Posted at 2009.06.01 11:42 pm by Julien
Hi Julien,
I am not sure why you deleted the post, but did you input somthing into the post title? WordPress do not save if the post title is empty. Please check it out.
About documentation, I have not written how to use this plugin in detail. Many information is in thses comments and wordpress plugin directory. If you have any questions, let me know. Thanks.
Posted at 2009.06.02 9:04 am by Wordpress Go Go
こんにちは
とても便利なプラグインをありがとうございます。ありがたく使わせていただいております。
1.2より追加された、multipleの機能ですが、入力欄が非常にすっきりしてとてもいいですね!
以下のように使用したいと思うのですが、アドバイスをいただけないでしょうか?
(1)新規の時点ではフィールドは1つだけ表示(現状は2つ以上?)
(2)「追加」をクリックで下にフィールドを追加(現状は上に追加される)※同一キーがすでに2つ以上表示されている場合はその中で一番下に追加
(3)データの順番も同一キーの中で一番後ろになるように
(3)表示の部分ですが、dt(キー名が表示される部分)はひとつのキーにつきひとつで、dd(もしくはinput)のみを追加
「ひとつデータを入力したあとで、次のデータがある場合に追加を押してそこへ入力、さらにもうひとつある場合はまた追加を押してそこへ入力⇒入力した順で表示したい」
という使い方が想定されるため上記のようにできれば一番使いやすいと思った次第です。
自分で改造しようと思いましたが、未熟なため挫折しました。
Posted at 2009.06.04 11:30 am by siro
I’ve been encountering the same issue that Ray mentioned a while back. When I use “Add media file from URL”, it goes into the regular content editor instead of the custom field box.
What I’m doing specifically is this: I click the video upload icon (from the custom field area, of course) and choose “Add media file from URL”. I paste in a youtube link in the form http://www.youtube.com/watch?v=... and then type in a title for the video.
The resulting link is exactly what I need, but it ALWAYS goes into the regular editor and I have to copy/paste it into the correct textarea.
Thanks for a great plugin!
Posted at 2009.06.07 2:17 am by Lane
siroさん
どうもお返事遅くなりました。
いくつかご要望をいただきましてありがとうございます。
なかなか忙しいのと、システム的に難しかったりするのでご要望を実現できるかはわかりませんが、前向きに検討させていただきます。
どうもありがとうございました。
Posted at 2009.06.08 9:41 am by Wordpress Go Go
hello!
thank you for your plugin!
I would like to link the values to the a post named in the same way, with the profile of the guest (ie. link the custom field Pippo to the post named “Pippo”, instead to all the other posts with the same custom field)
do you think that’s possible to do something like this? any idea on what should I change?
thank you!
Posted at 2009.06.08 11:56 pm by morris
こんにちは
multipleの機能について質問させていただいたsiroです。
システム的に難しいですか・・・私のような未熟者がやってみようとしてもうまくいかないわけですね^^;
お忙しい中恐縮ではございますが、実現いただけるのを期待してお待ちしております!
そしてこれからもありがたく使わせていただきます!
Posted at 2009.06.09 1:08 pm by siro
Hi morris,
I may not understand well what you want, but probably you can achieve it by use of PHP Code options.Please check it out.
Posted at 2009.06.10 10:55 am by Wordpress Go Go
Hi Lane,
Thank you for reporting a bug. I confirmed the situation you mentioned. `Add media file from URL` does not work properly right now. I will fix it in the near future. Thanks.
Posted at 2009.06.10 10:58 am by Wordpress Go Go
I have translated the plugin into Persian. Let me know to what address I should sent it.
Posted at 2009.06.12 10:46 am by Sourena Parham
Thank you for translating into Persian. Please send .po and .mo files to webmaster[[at]]wordpressgogo.com . Change [[at]] into @. Thanks.
Posted at 2009.06.12 2:10 pm by Wordpress Go Go
1.3.0 で変な表示がありましたので、ご報告いたします。
ギャラリーだけ掲載した記事をアップしたところ、the_excerpt_rssで以下のような表示がされました。
CFTを止めると消えます。
WordPressは、2.7.1です。
ご確認のほど、よろしくお願いいたします。
Posted at 2009.06.15 10:28 pm by よろず屋
Hiroaki:
First of all, thank you for your hard work developing and maintaining such an excellent plugin. I am using it on a few sites that I am developing. It solves a number of problems for me.
I believe I have encountered a bug in your “settings” form.
I am playing with your PHP CODE option. I find that when I update the settings with PHP CODE, it sometimes erases my TEMPLATE. When I re-enter my TEMPLATE, it erases all my PHP code.
I am writing my code in a local text editor, so I’m only losing a few seconds of work when this happens. Because of what I am doing, I may be hitting the UPDATE OPTIONS button in the PHP Code section whn I have not made any updates.
I have your plugin v1.3.0 on WP 2.8. I’ve experienced this problem in FF (3.0.11) and Chrome (2.0.172.31)
Posted at 2009.06.16 3:25 am by ChrisI
よろず屋さん
お返事遅くなりました。確かにバグがあったようです。the_excerpt()、the_excerpt_rss()ではショートコードを実行しないように修正を加えた1.3.1をリリースしていますので使ってみてください。それではよろしくお願いいたします。
Posted at 2009.06.18 10:08 pm by Wordpress Go Go
Hi ChrisI,
I have never encountered like your situation yet. You seem to hit the Update Options button in the different sections, but if it reappears please let me know the detail you did. Thanks.
Posted at 2009.06.18 10:20 pm by Wordpress Go Go
Please see the bug
http://wordpress.org/support/topic/281677?replies=2#post-1108894
Issue is- for any field with value inputted in textarea ( tinymce=true)
the formatting (paragraph change) is not shown in the post
eg. different paragraphs are shown together
input:
eewferg trhggerger
gtergehghg
output:
eewferg trhggerger gtergehghg
Posted at 2009.06.19 5:15 am by Scorpio84
this doesn’t only seem to work for paragraph change. Bold italics seem to work fine
Posted at 2009.06.19 5:17 am by Scorpio84
Hi Scorpio84,
If you would like to add p and br tags in textareas automatically, please check `Use wpautop function` in the setting page. Thanks.
Posted at 2009.06.21 1:22 pm by Wordpress Go Go
Hi Hiroaki,
I have a feature request.
Not sure if it’s possible with this plugin.
I would like to add custom fields to the author profile page.
What do you think?
Would this require a lot of work?
Posted at 2009.06.26 6:14 am by Ray
Hi Hiroaki,
Another feature request! (Sorry!)
For the PHP Code option and option select menus, right now we can have an array for values:
eg.
$values = array(‘apple’,'orange’,'banana’);
Can we have another variable called $valueLabels so we can add a label to the $values array?
eg.
$valueLabels = array(‘Apples,’Oranges’,'Bananas’);
Thanks for reading!
-Ray
Posted at 2009.06.27 4:29 am by Ray
Hi Ray,
About adding custom fields into the author profile page, because it is different from the post custom fields, it may be hard to apply the current system to the author profile page. But the idea seems to be good so I will consider about it in the future release.
About $valueLabels, you can already use it but not $valueLabels. It is `$valueLabel`. It is not plural. I am sorry about that.
Posted at 2009.06.27 8:24 am by Wordpress Go Go
Hi Hiroaki,
Thanks for clarifying about the $valueLabel array in PHP Code.
Works well! Very handy! :)
About the author profile custom fields, I don’t think it is very important. Do not put any time into this!
Posted at 2009.06.28 3:11 am by Ray
I can’t seem to get spaces to go in between custom fields I have added. They all just appear one afer the other.
I am sure it is simple but I am missing something.
Posted at 2009.06.30 11:25 am by AJ
バグのご報告です。
1.3.2でtextareaのstyleが効きません。
style属性を二重に出力してしまっているのが原因のようです。
お手すきの時にご確認頂ければと思います。
Posted at 2009.07.01 4:57 pm by alcy
alcyさん、
ご報告ありがとうございます。1.3.4で修正いたしました。
Posted at 2009.07.02 10:00 pm by Wordpress Go Go
Works great, thank you
Posted at 2009.07.03 12:14 am by baron
Versions 1.3.2 and 1.3.4 have a bug. When using the_excerpt in a single.php template AND then the_content, having Custom Field Template installed makes BOTH show the excerpt. I’ve experienced it, and at least one other (see WP forum http://wordpress.org/support/topic/283763?replies=2).
Posted at 2009.07.04 7:10 am by Pariah Burke
Hi Pariah,
Thank you for reporting the bug. I probably fixed this bug in the version 1.3.5. Please try it out. Thanks.
Posted at 2009.07.05 2:03 pm by Wordpress Go Go
Hi.
First thank you for creating this plugin. It saves tons of time.
Question:
I am trying to list the custom fields without the labels being visible.
right now it says
Head Chef
Maria – Head Chef
I would just like the Maria line to show up and not the label. How can I do this?
Posted at 2009.07.06 3:36 am by Melissa
Then if the custom field names or the labels MUST appear, how do i make the label and the answer appear in the same line. I created it in a table but it won’t put them next to each other…
Posted at 2009.07.06 5:14 am by Melissa
Hello,
I am trying to get the checkbox to show up on my single.php file. This is my code in the
———————-
[Types of Productions Serviced]
type = checkbox
value = Commercials # Documentaries # Feature Films/Movies # Industry/Corporate Films # Music Videos # Photo Shoots # TV Programs # Web/Internet
——————————
I have this on my single.php file
ID, ‘Types of Productions Serviced’, true); ?>
please help, thanks,jb
Posted at 2009.07.08 6:43 pm by Jason
looks like my info got cut off from my above post, this is the php I am using-
echo get_post_meta($post->ID, ‘Types of Productions Serviced’, true);
It only shows the first checkbox, how do I get it to show all the checked boxes
Posted at 2009.07.08 8:19 pm by Jason
Hi Melissa,
You can use ADMIN CSS in order to customize the template layouts. You may use `display: none;` or `float: left;’. Please do trial and error.
Posted at 2009.07.10 9:18 am by Wordpress Go Go
Ktai Styleとの併用に関して教えてください。
いつも利用させていただいております。
Ktai Styleと言うプラグインを導入し、携帯サイトから閲覧しようとすると、エラーが発生しています。ちょっとCustom Field Templateが原因か他の部分が原因か切り分けが十分出来ていません。
発生する場所はバージョン1.3.5の、
cstom-field-template.phpの2741行です。
Ktai Styleの処理で何か問題があると思いますが暫定対策として携帯からのアクセスの場合Custom Field Templateを使わない様にしようと考えています。
記事毎にコードを書いて処理は可能なのですができればまとめて使わない様にしたいと思っています。今行っている処理は、
if(!is_ktai())
echo ‘[cft format=0]‘;
の様なコードを記事に追加する事です。
記事毎にこの様なコードを書かずに何かまとめて対応する方法は無いでしょうか。custom-field-template.phpを修正しようかと思いましたが十分理解できませんでした。
何かアドバイス頂ければ幸いです。
Posted at 2009.07.10 9:23 am by ねこ好き
Hi Jason,
Please take a look at the following page.
http://codex.wordpress.org/Function_Reference/get_post_meta
If the last parameter is `false`, this function returns an array of the custom fields. So you can use `foreach` or `for` to make the array loop. Please try it out.
Posted at 2009.07.10 9:26 am by Wordpress Go Go
ねこ好き さん、
どうもこんにちは。Custom Field templateの設定画面にある
Auto Hook of `the_content()` (Experimental Option)
を使ってみてはいかがでしょうか。PHPコードも使用できるのでそこに条件分岐を書いていただければできるのではないかと思います。
試してみてください。
Posted at 2009.07.10 9:42 am by Wordpress Go Go
コメントありがとう御座います。
実は投稿済みの記事全体(約400件)を変更していまして。記事の一部でCustom Template Fieldの利用方法が異なっていてAuto Hookを利用できないでいます。
全部の記事を修正してAuto Hookで対応したいと思います。
コードをいじるのはさすがに抵抗があったので迷ってました。
ありがとう御座いました。
Posted at 2009.07.10 2:18 pm by ねこ好き
Is there any tutorial on how to display these custom field on the front page of the post?
I can seem to find any thing on how to set it up, not everyone are php freaks.
Thanks
Posted at 2009.07.13 3:27 am by Niklas
Excellent Plugin!.
What do you suggest for the event that I am a Post of a patient data and want to link to this post with several lines of information visits, medication or treatment for this patient?
Posted at 2009.07.18 4:38 pm by Alex
Hi Niklas,
I am sorry for my late reply. There are several ways to display custom fields. Choose a way as you like in the following.
1. To use [cft] shortcode format. Please set up [cft] in the setting page and add the code like [cft format=0] in the post content.
2. If you want to insert a particular key value in the post, this is a easy way. Add [cft key=Key_Name] in the post content.
3. To use php codes. Look at the codex of wordpress.org.
http://codex.wordpress.org/Custom_Fields
I hope these will work for you. If you have any other questions, please let me know with more detail info you want to do. Thanks.
Posted at 2009.07.18 5:01 pm by Wordpress Go Go
Hi Alex,
I am not sure what you exactly want to do, but how about using categories. You make patient data category and information visits category. You need to write some php code to make a correlation between these category posts. You also may need to design to display related data you set. Well, if you want to know more, please send email from contact page. I can help you with it as a business. Thanks.
Posted at 2009.07.18 5:19 pm by Wordpress Go Go
Thanks for the plugin! But we have a problem with Wp 2.8.1 and 2.8.2. It all seemd to work fine in 2.8 but with the latest updates we get a Fatal error on the “manage postst” screen: Allowed memory size of 33554432 bytes exhausted…
We have over 25.000 posts and I don’t think WP likes to load all the custom fields with those posts;) Does anyone have this problem and is there any fix available?
Posted at 2009.07.21 6:23 pm by finzend
Hi finzend,
I have not seen that kind of error yet. Could you show me the whole error sentence in order to specify where is the cause. Thanks.
Posted at 2009.07.23 9:20 am by Wordpress Go Go
Hi, I just want to ask, if it is somehow possible to make multile groups in Custom Field Template? I want to use 2 text fields per group. The first one is for a download description and the second one is for a downloadlink.
Posted at 2009.07.27 3:22 am by Senshi
Hi Senshi,
Currently, multiple group option is not supported yet. I agree to add the functionality, so let me have some time to develop it. Thanks.
Posted at 2009.07.29 12:11 am by Wordpress Go Go
@Wordpress Go Go: we get a blank/white screen with the following error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 286721 bytes) in /var/www/httpdocs/wp-includes/functions.php on line 2754
When I deactivate the custom-field plugin the error dissapears. The error also dissapears when I set the wp_memory_limit to 64M (default 32M).
Is there a way to make sure that the plugin doesnt try to print/load the custom fields in the “Edit posts” screen? I think that causes the extra db-connections and memory…?
Posted at 2009.07.29 8:43 pm by finzend
Hmmm, could you tell me which version of WordPress you are using? Thanks.
Posted at 2009.07.29 8:49 pm by Wordpress Go Go
Hi there.
I just come across your wonderful plugin but am not a coder and am having trouble understanding how to get the custom fields to display on my post.
I can work out how to make the template, but not the code to display the keys.
currently my site using the following
ID, ‘location’, true);?>
for a key, but i tried this with your keys in the default template and it doesn’t work. Is there sample code anyway that prints a key to a page?
thanks
Nicole
Posted at 2009.07.31 3:57 pm by nicole
Hi nicole,
I may not get your point, but about how to use custom fileds, please see the following.
http://codex.wordpress.org/Custom_Fields
Faq may be useful for you.
http://wordpress.org/extend/plugins/custom-field-template/faq/
Thanks.
Posted at 2009.08.04 9:31 am by Wordpress Go Go
非常に便利なプラグインをありがとうございます。
ありがたく使わせていただいております。
問題が発生しており困っております。
複数のカスタムフィールドテンプレートTEMPLATE #0~5を切り替えて使用しており、問題なく使えていたのですが、突然、切り替えても別のテンプレートが出てくるようになり目的のテンプレートが使えなくなりました。他のプラグインをすべてオフにしてみましたが解決しませんでした。
改造などはしておりません。
WPのバージョンは2.7.1です
何かお心当たりはありませんでしょうか?
Posted at 2009.08.04 12:08 pm by k-design
k-designさん、
どうもこんにちは。
テンプレートの切り替えが突然うまくできなくなった、ということですが、もう少し具体的に状況を説明していただけますか。
カテゴリーIDでの絞り込みなどはしていませんか。他のWordPressの環境があれば、そちらでも再現するか確認できますか。
実際に管理画面を見せていただければ、解決しやすいと思いますので、それが可能ならコメント欄よりもお問い合わせからご連絡ください。
それではどうぞよろしくお願いします。
Posted at 2009.08.04 1:04 pm by Wordpress Go Go
原因は結局わからなかったのですが、先ほど確認したら、なぜかなおっておりました。
何かしてなおった訳ではなく、他の方でこのような症状があるわけでもなさそうですので、何かこちらの環境的なものだったのかもわかりません。
どうもお騒がせして申し訳ありませんでした。。。
これからもありがたく使わせていただきます
ありがとうございました!
Posted at 2009.08.04 5:20 pm by k-design
@Wordpress Go Go: we now use 2.8.3 but we have also used 2.8.1 and 2.8.2 in the last weeks.
Posted at 2009.08.04 8:39 pm by finzend
Hi finzend,
Does that error only show up in `edit.php`? Could you try to check `Disable the custom field column` on the setting page? Thanks.
Posted at 2009.08.05 11:11 am by Wordpress Go Go
Keep up the good work. Donation sent.
John Myrstad
Posted at 2009.08.13 3:33 am by John Myrstad
Hi John,
Thank you for your donation. I really appreciate it. If you have any requests, please let me know. Thanks!
Posted at 2009.08.13 9:27 am by Wordpress Go Go
@Wordpress Go Go: check, it works! Thanks alot!
Posted at 2009.08.17 10:15 pm by finzend
Hiroaki – Thank you for a very useful plugin.
I’m using a CFT to allow a user to select a name from a select box. the select box is poplated using this query in CODE#0
$values = array();
$valueLabel = array();
$posts = get_posts(‘category=3′);
foreach($posts as $post) {
$values[] = $post->ID;
$valueLabel[] = $post->post_title;
}
The CFT for the select box is:
[topname]
label = Top Name
type = select
code = 0
I have at least 10 posts in category 3, however only 5 values are showing in the select box.
Any ideas? Am I doing something wrong? is this a built-in limitation?
I’m open to an alternative to the select box if something exists.
Donation on the way, also. If this plugin can solve my short-term needs, I may inquire about some premium services.
Posted at 2009.08.19 3:56 pm by Justin
The default `numberposts` is 5. So if you want to get more posts, you need to specify it. Something like this:
$posts = get_posts(‘category=3&numberposts=100′);
About the get_posts function, look at the following.
http://codex.wordpress.org/Template_Tags/get_posts
I hope this info will help you. Thanks.
Posted at 2009.08.19 6:09 pm by Wordpress Go Go
That actually works very well – sorry I missed that part of the documentation for the get_posts() function.
Happy to report it is loading 230+ custom values with minimal impact on system performance so far. Again,many thanks. Watch your paypal!
Posted at 2009.08.20 11:32 am by Justin
Hi Justin,
Thank you for your donation. I really appreciate it. If you have any other questions, please let me know at any time. Thanks again.
Posted at 2009.08.20 11:49 am by Wordpress Go Go
is there a way to include the time in a date field?
Posted at 2009.08.25 11:07 pm by elvis
Hi elvis,
I am using the jquery datePicker plugin for the date input. But it does not seem to support the time. If you know any good jquery plugins, I will include it in the future release. Thanks.
Posted at 2009.08.27 10:59 am by Wordpress Go Go
Hi
i have not used it but this one looks good.
http://blogs.uct.ac.za/blog/lovemores-world/2009/02/25/an-effective-jquery-date-time-picker
demo here:
http://milesich.com/tpdemo/
maybe you could have date with option =date or datetime
Posted at 2009.08.27 7:34 pm by elvis
はじめまして。
素晴らしいプラグインをありがとうございます。
お陰さまで、サイトの情報入力が楽になり助かっております。
さて、ひとつお尋ねがあります。
複数にフィールドを設け、ループでテーブルに情報を表示させたいと
考えています。表示まではなんとか出来るようになりましたが、
ある記事のあるフィールドの情報を入力せず(入力する必要がないため)
記事を投稿したところ、それまでは問題なかったフィールドの並び順に
狂いが生じました。
フィールドには、常に情報を入力するものと、時折情報を入力する必要の
無いものがあります。
可能であれば、フィールドの表示順を固定させ、入力されていないフィールドが
ある場合、そのフィールドを除き、決められてた順番でフィールドを表示させたいと
考えています
上記が可能であれば、ご指導いただけないでしょうか。
宜しくお願いいたします。
なお、テンプレートコンテンツとsingle.phpのソースを下記の通りとなります。
■テンプレートコンテンツ
[エリア]
type = text
size = 35
id = 1
[タイトル]
type = textarea
rows = 1
cols = 10
size = 35
tinyMCE = true
id = 2
[プログラム]
type = textarea
rows = 4
cols = 40
tinyMCE = true
mediaButton = true
id = 3
[開催日]
type = text
size = 35
id = 4
[時間]
type = text
size = 35
id = 5
■single.phpのソース
<?php
$custom_keys = get_post_custom_keys();
if ($custom_keys) {
$outdata = "”;
foreach ($custom_keys as $key) {
if ( “_” != substr($key,0,1) ) {
if ( “L” != substr($key,0,1) ) {
$outdata .= “”;
$outdata .= $key;
$outdata .= “”;
$valuearray = get_post_custom_values($key);
$outdata .= implode(“,”,$valuearray);
$outdata .= “”;
}
}
}
$outdata .= “”;
}
echo $outdata;
?>
※上記テーブルに表示させないフィールドが複数あり、
そのデータを表示させないよう設定しています。
Posted at 2009.08.28 4:53 pm by だん山
だん山さん、こんにちは。
カスタムフィールドの並び順についてですが、`blank = true`を指定すると値が空でも、空のデータを作成してくれるので、試してみていただければと思います。
Posted at 2009.08.31 6:39 pm by Wordpress Go Go
Wordpress Go Goさん
お返事、ありがとうございました。
教えていただきました方法ですと、テーブルに空のセルが表示されてしまうのでしょうか?
今回、できれば空のセルは表示させずに、カスタムフィールドの表示順を固定できればと思っています。
宜しくお願いいたします。
Posted at 2009.09.01 11:47 am by だん山
hello, is it possible with your plugin to set some predefined SETS of custom template fields?
i need to choose between some kind of Custom field Templates, then put the data, and then build some special template pages that get the metadata in my formatted way.
many thanks!!
Posted at 2009.09.02 8:38 pm by simone
だん山さん、
確かに`blank = true`を設定すると、データがない場合は空のデータがテーブル内に生成されます。単に空のデータを表示したくないだけであれば、PHPで空でなければ表示というif文を加えればいいと思います。
代替手段としては、Custom Field Template の[cft]のショートコードフォーマットを使用する方法です。これをソースのプログラム側で呼び出す方法ですが、以下のような感じです。FORMAT #0を呼び出します。
`echo $custom_field_template->output_custom_field_values(array(‘format’=>0));`
以上、参考にしてみてください。
Posted at 2009.09.03 9:20 am by Wordpress Go Go
Hi simone,
I am not sure what you want to do, but you can set default values if you add the `default = blah` attribute in each field. If you specify the detail you want to do with some examples, I may give you more information. Thanks.
Posted at 2009.09.03 9:29 am by Wordpress Go Go
Hi I’d love to have a function to toggle the checked or unchecked checkboxes, like “Select all” “select none” in multiple Checkboxes. Is that possible?
Posted at 2009.09.10 9:20 pm by Daniel
Hi Daniel,
Its functionality seems good. I will add it in the next version of this plugin. Thanks.
Posted at 2009.09.11 2:36 pm by Wordpress Go Go
いつもお世話になっております。
使い方がわからない機能があるので、教えてください。
設定画面で「ページテンプレートファイル名 (カンマ区切り)」という項目がありますが、どういった使い方が出来るのでしょうか?
もし利用方法等の記述がどこかにあれば、恐縮ですが場所等をご案内いただければと思います。
よろしくお願い致します。
Posted at 2009.09.11 2:44 pm by かとう
どうもこんにちは。
オリジナルのページテンプレートを作成している場合、そのページテンプレートファイルに応じたカスタムフィールドテンプレートを呼び出すことができます。
たとえば、page_fullwidth.phpというページテンプレートがあれば、このファイル名のpage_fullwidth.phpをページテンプレートファイル名に入力してください。複数あればカンマ,で区切ってください。
page.php以外のページテンプレートがなければこの項目は関係ありません。
それではどうぞよろしくお願いいたします。
Posted at 2009.09.11 3:27 pm by Wordpress Go Go
Do you know if there is any way to make a custom menu link in the admin that would initialize a certain template, in the post of page editor?
Posted at 2009.09.16 12:47 am by Jason
Hi Jason,
I am sorry that I am not sure what you would like to. Could you gime me more information you want to do. Thanks.
Posted at 2009.09.18 10:13 am by Wordpress Go Go
New russian tranclation (ru_RU) for 1.3.8 http://www.sonika.ru/blog/?dl=66
Posted at 2009.09.25 1:47 am by sonika
Thank you for updating the translation file. I will include it in the next release.
Posted at 2009.09.26 9:13 am by Wordpress Go Go
はじめまして。このプラグインをいつも便利に使わせていただいてます。
1つトラブルがありまして、1.4から追加されたtype = file が、全く表示されずに困っております。入力内容はこのようにしています。
[image1]
type = file
label = 画像1
使わせていただいているバージョンは1.4.2 で、WPは2.8.4です。ちなみに、他のtypeは全く問題なく動作しています。
今のところmediaButtonで代替していますが、Fileを直接扱えると非常に便利ですので、お心当たりがありましたらよろしくお願いいたします。
Posted at 2009.10.18 7:47 pm by Tomoki
Tomokiさん、こんにちは。
まったく表示されない、というのはファイル選択のボタンがない、ということですよね。ソースを見てもエラーなど何も出てませんでしょうか。
こちらの環境では問題なく機能しております。
エラーなどがないとなるとなんとも言えないのですが、実際の画面を見せていただけるともう少し分かるかもしれませんが。
よろしければお問い合わせよりご連絡ください。
Posted at 2009.10.18 10:37 pm by Wordpress Go Go
Hi!
I’m using custom fields for my post (kind of catalogue) – and found your plugin for a great help. Thanks.
However, I have one question: how to change sequence of fields with the same label? Say, I have in your code something like:
[Education]
type = textfield
size = 50
[Education]
type = textfield
size = 50
hideKey = true
and so on – title Education is repeated several times. When I write in values, I’m not sure, how they will be ordered when in output. Which of the same field name will be first, which second and so on. I need to have specific, user-defined sequence.
Do you have any suggestion?
Thanks.
Posted at 2009.10.19 10:11 pm by Anso
Hi Anso,
Please use the latest version of this plugin. The value order in the editing page will be maintained when you posted. How do you output the custom fields in the frontend? The default function such as `get_post_meta` may not keep the order when you posted. You can use the [cft] shortcode in order to output the custom fields. BTW, `multiple = true` and `multipleButton = true` may be helpful for you. Please try it out. Thanks.
Posted at 2009.10.19 11:51 pm by Wordpress Go Go
Thank you for your answer.
I’m using latest version and ‘get_post_meta’ in front end using custom page template.
I’ll try to investigate [cft] or ‘multiple=…’
thanks.
Posted at 2009.10.20 1:01 am by Anso
1.4.4 を使っています。
1つ要望です。
checkboxとlabelを併用した時に、入力画面にてcheckboxの数だけlabelが表示されてしまいました。
項目を複数用意した場合も1つの項目で用意した場合も同じようなタグ出力になっているようです。
radioと同様に、dd1つの中に全チェックボックスが入るように出来ませんでしょうか?
これにより、スタイルの調整もし易くなりますので、すごく助かります。
よろしくお願い致します。
Posted at 2009.10.23 6:19 pm by かとう
I’ve have Theseis 6.0 and WP 8.5 running when I installed the Custom-Field-template upgrage of 4.3 it broke the WP editor so that none of the editor buttons were showing. (I took out all the plugins) and it was CFT that broke the WP editor. Upgraded to 4.4 and still broken … was able to downgrade to 3.8 and everything works as before. This must be a conflict with the Thesis theme or Wordpress jquery?
Any suggestions or help — love this plugin.
Posted at 2009.10.25 9:05 am by Honolulu Vacation Rentals
I have never used the Thesis theme so I am not sure what is the problem between the theme and the plugin. I tried to get the theme but it seems not to be free. Could you show me the screenshot or the javascript error, or your admin ID and pass? The temporary account is ok for it. Please use the contact form. Thanks.
Posted at 2009.10.25 12:33 pm by Wordpress Go Go
こんにちは、いつも便利に使わせていただいております。
このたび、custom field template を1.4.4にアップデートしたところ、以下のような症状が出ております。
WPのバージョンは2.8.4と2.7.1で、それぞれ別サイトで使用しておりますが、同じ症状です。
一度入力して投稿した後に、そのカスタムフィールドの内容を空白にして更新すると空白にする前の内容が消えずに残ります。空白ではなく別の内容に修正した場合は問題なく反映されます。
以前のバージョンでは空白の状態で更新されていました。
Posted at 2009.10.26 2:45 pm by kdsgn
かとうさん、どうもお返事遅くなりました。
checkboxのラベルについてとりあえず最初のものだけラベルを表示するように変更しました。
dd1つの中に全チェックボックスが入るようには検討してみますが少し時間がかかると思います。
最新バージョン1.4.5を使ってみてください。
Posted at 2009.10.26 4:45 pm by Wordpress Go Go
kdsgn さん、どうもこんにちは。
ご連絡いただきましてありがとうございます。1.4.5で修正いたしましたので試してみてください。それではよろしくお願いいたします。
Posted at 2009.10.26 4:46 pm by Wordpress Go Go
こんにちは、
すばやいご対応ありがとうございました!
早速アップデートして試したところ、正常に更新されました。
どうもありがとうございます。
Posted at 2009.10.26 5:18 pm by kdsgn
先ほどアップデートし、余分にLabelが出ないことを確認致しました。
ご対応ありがとうございました。
Posted at 2009.10.27 5:48 pm by かとう
Great plugin. Only i think i found an error in the HTML-output for checkboxes.
It gives every checkbox his own end- and closing-tag instead of -tags. Then it gives every checbox-DL the original, same ID (#) as his parent.
So if you style the DL’s (for example a 50% width for two columns) the separate chexboxes respond tot this too.
Posted at 2009.10.27 7:49 pm by John
I just upgraded to the 1.4.5 version with WP v 2.8.5. When I load different forms it erases the data from the previous form. ie. I have one form with three check boxes, then another form with a text field. If I check one of the check boxes and hit save. then load the form wih the text field and switch back to the checkbox form the checkboxes are all gone. this also happens when I hit the WP “publish” button.
Posted at 2009.10.28 8:48 am by Jared
Yeah there’s a serious bug related to the checkboxes now. They don’t retain their values when you hit publish or switch between forms. Even if you have the “autosave” function turned on. They even disappear from the default custom field (WP version) below. I’m downgrading back to the last known stable version. please fix this asap. I love the plugin and DONt WANT TO SWITCH!
Posted at 2009.10.28 9:00 am by Jared
Confirmed that the functionality is restored when downgraded to 1.4.2 when used with WP 2.8.5
Posted at 2009.10.28 9:04 am by Jared
Hi Jared,
Could you show me the template content you are using? I would like to try it in my server. Thanks
Posted at 2009.10.28 9:26 am by Wordpress Go Go
Hi Jared,
The version 1.4.5 has a checkbox saving bug. I fixed it in the version 1.4.6. So could you try it out? Thanks.
Posted at 2009.10.28 10:05 pm by Wordpress Go Go
Hi. This plugin is amazing. I am having one problem, which is the same problem as Jonathan Bailey – even when I say insertTag = false, the tag still gets created. I double checked and I do not have insertTag = true anywhere. Any advice?
Posted at 2009.10.29 4:31 am by negs
Wait – I haven’t updated to new version yet. I will do so and then tell you if I have the same problem.
Posted at 2009.10.29 4:33 am by negs
I updated and still have this problem. Any suggestions?
Posted at 2009.10.29 4:38 am by negs
Hi!
When I use type = file (and relation = true), the file uploads sucessfully and is associated with the post, but the attachment id isn’t being added as a meta field to that post?
Posted at 2009.10.29 6:43 am by Jono Alderson
Just checked that version 1.4.6 has fixed the checkbox bug I mentioned earlier and it has indeed been fixed. I appreciate it very much.
Posted at 2009.10.29 7:38 am by Jared
Hi negs,
if you do not want to insert tags automatically, do not write down `insertTag = false`. The tags are not created in the default.
Posted at 2009.10.29 12:55 pm by Wordpress Go Go
Hi Jono,
I fixed the file type bug in the version 1.4.7. Please try it out. Thanks.
Posted at 2009.10.29 12:55 pm by Wordpress Go Go
Hmm,
I’ve upgraded to 1.4.7, but now it doesn’t appear to be uploading the images at all – no sign of them in the media library or post meta data?
:)
Posted at 2009.10.29 5:44 pm by Jonathan Alderson
Could you show me the template content you are using? I would like to try it in my server. Thanks.
Posted at 2009.10.29 8:03 pm by Wordpress Go Go
Certainly – what can I send/show you?
I really appreciate your help on this – your plugin is fantastic, and it’d make life so wonderfully easy if we could get this working!
I’m confused that this worked previously, but recent updates seem to have killed it, unless it’s an incompatibility with another plugin, maybe?
Posted at 2009.10.29 9:13 pm by Jonathan Alderson
The template content is something like this:
[file1]
type = file
relation = true
Please show me it. Could you try to deactivate all plugins except the custom field template?
Posted at 2009.10.29 10:12 pm by Wordpress Go Go
I’ve tried disabling all other products, and it’s still not uploading the file. Currently using:
[Banner]
type = file
relation = true
[Banner Overlay]
type = file
relation = true
[Icon]
type = file
relation = true
Posted at 2009.10.29 10:39 pm by Jonathan Alderson
I confirmed the bug which the capital letters of meta key names cause and fixed it in the version 1.4.8. Please try it out. Thank you.
Posted at 2009.10.30 1:19 am by Wordpress Go Go
Fixed! You are my most favourite person ever!
Thank you ever so much :)
Posted at 2009.10.30 2:08 am by Jonathan Alderson
Great plugin! If only there were a tutorial for begginers so that I could make it work in my theme… Because I can’t make the short codes work. Where can I use them? I tried putting them: in the post – not work; in single.php – not working. For example: I put in my post [cft format=0], [key], etc… – the codes appeared in my site exactly the same way – as a code (not the custom fields value).
I found a piece of code elsewhere which works in php files and I started using it but it doesn’t show all the field’s properties (those “before =” and “after =”). Here it is:
‘ID, ‘Описание’);
if($block){
foreach(($block) as $blocks) {
echo $blocks;
}
}’
I’d be very grateful if you explain with real examples how a newbee should implement the shortcode or the php codes. Thanks a lot!
Posted at 2009.10.31 12:42 am by xSEOn
Hmm – one more thing…
Is it possible to hide a fieldset which isn’t enabled for a particular page/post?
e.g, I use a few custom fields for my homepage which don’t apply to any others. I’ve got it up in the custom fields admin to apply only to that page, but the option is still available in the dropdown with other fieldsets, even though it’s empty.
Any thoughts? :)
Posted at 2009.11.01 10:37 pm by Jono Alderson
Hi xSEOn,
[cft] shortcodes do not work in the template files like index.php, single.php, etc. Shortcodes only work in the post content in the admin panel.
In order to load the custom field template shortcode format in the theme files, do something like this:
global $custom_field_template;
$custom_field_template->output_custom_field_values(array(‘post_id’=>$post->ID, ‘format’=>0));
I know I should write the documentation and explain how to use the plugin, but I have not achieve it yet because I do not have much time to do so….
Posted at 2009.11.05 11:26 pm by Wordpress Go Go
Hi Jono,
There are `level` attributes to control user levels, but you seem to manage the template itself according to the user levels. I will consider it in the future release. Thanks.
Posted at 2009.11.05 11:34 pm by Wordpress Go Go
Hello,
I found a bug in plugin, when you use:
[key]
type=file
relation = true
Upload works fine, however if I delete the value – check “Delete” checkbox then save/update……record gets deleted only from wp_posts , but wp_post_meta still contains the key (value of the key is ID of the post – file uploaded previously).
Is there any fix for this?
Thanks.
Posted at 2009.11.06 10:51 pm by Reggie
I just wanted to help/comment that it is possible to use shortcodes in .php template files by using the do_shortcode command. Eg: :)
Posted at 2009.11.07 2:44 am by Winnie Lim
For easy inclusion in templates, I use something like the following…
$dayHistory = get_post_meta($post->ID, “History”, true);
if($dayHistory){ echo “History”.$dayHistory; }
Or for file types…
$banner = get_post_meta($post->ID, “Banner”, true);
if ($banner) { $bannerImage = wp_get_attachment_url($banner); } else { $bannerImage = “http://www.site.com/images/banner.jpg”; }
Which has a nice fallback onto a default..
Posted at 2009.11.07 9:13 pm by Jono Alderson
Hi Reggie,
I confirmed the bug you mentioned. I will fix it in the next release. Thanks.
Posted at 2009.11.11 12:36 am by Wordpress Go Go
Hi Winnie,
Thank you for your advice. Yeah, it is possible to use the cft shortcode by use of the `do_shortcode` function. I should write it somewhere. It may be useful for anyone who wants to use the shortcode in the theme files. Thanks again.
Posted at 2009.11.11 12:39 am by Wordpress Go Go
Hello, thanks for the great plugin!
I would like to ask for help about this:
I have four pages where the user insert 4 different types of posts (every page has different fields to fill) and I would like to set a different radio default for every page. Is it possible?
I wrote this in code#0:
switch ($thisPage) {
case ‘wall’:
$values = array(‘wall’, ‘news’, ‘people’, ’showcase’); $default = ‘wall’;
case ‘people’:
$values = array(‘wall’, ‘news’, ‘people’, ’showcase’); $default = ‘people’;
case ’showcase’:
$values = array(‘wall’, ‘news’, ‘people’, ’showcase’); $default = ’showcase’;
case ‘news’:
$values = array(‘wall’, ‘news’, ‘people’, ’showcase’); $default = ‘news’;
}
$thisPage is set in every different post page, but this is doesn’t seem to work (Parse error: parse error in F:\wamp\www\+++++\wp-content\plugins\custom-field-template\custom-field-template.php(1419) : eval()’d code on line 3)
thanks in advance for your help!
Posted at 2009.11.11 3:52 am by Danny
Hi there,
I still love your plugin and just found some time to play with the date picker – its cool, but it has some flaws:
1. No time picker. I tried to make an extra field, parse it and add it to the other field. Works somehow, but with flaws and its complicated.
2. It returns a string to the text field, which can be altered by the users (Can be fixed easily by adding the read only attribute).
3. It saves the result as string in the database – it should get saved as standard timestamp. If you choose to alter your date format at some point, you will be doomed, because you cannot read it afterwards. Very bad, not futureproof.
I would be willing to contribute again if you solve this issues!
Posted at 2009.11.12 3:41 am by pampfelimetten
Hi Danny,
That error is caused by a syntax error in the php code you set. I am not sure how $thisPage is loaded, but `global $thisPage;` before the code should be needed. One more thing, `break;` should be in the end of each case. Thanks.
Posted at 2009.11.13 9:09 am by Wordpress Go Go
Hi pampfelimetten,
This is my answers for your questions.
1. I will consider to add the time picker in the future release. Please let me have some time.
2. `readOnly = true` attribute already exists. Please try it out.
3. How about using `code` and `editCode` options?
TEMPLATE CONTENT #0
[date]
type = text
date = true
code = 0
editCode = 1
CODE #0
$value = get_post_meta( $_REQUEST['post'], $title, true);
if ( $value ) $enforced_value = date(‘d/m/Y’, $value);
CODE #1
$value = date(‘U’, mktime(0, 0, 0, substr($value, 3, 2), substr($value, 0, 2), substr($value, 6, 4)));
The saved data is a timestamp.
I home these will work for you. Thanks.
Posted at 2009.11.13 10:08 am by Wordpress Go Go
Hiroaki San, thanks for your quick reply.
I have corrected the script and now there are no sybtax errors but it still doesn’t work.
in Template I have:
[Page]
type = radio
code = 0
in code 0
global $thisPage;
switch ($thisPage) {
case ‘wall’:
$values = array(’wall’, ‘news’, ‘people’, ’showcase’); $default = ‘wall’;
break;
case ‘people’:
$values = array(’wall’, ‘news’, ‘people’, ’showcase’); $default = ‘people’;
break;
case ’showcase’:
$values = array(’wall’, ‘news’, ‘people’, ’showcase’); $default = ’showcase’;
break;
case ‘news’:
$values = array(’wall’, ‘news’, ‘people’, ’showcase’); $default = ‘news’;
break;
}
and in the page, IE, post-wall.php I have set $thisPage = ‘wall’;
The result is a radio button with only one value (not shown). could you help me? what’s wrong?
Posted at 2009.11.13 10:27 pm by Danny
textareaで文章が少しなってしまうと
ajaxが414 Request-URI Too Large
を返して保存できません。
オプションリストの使い方がよくわかってないのもありますが、これは解決できる問題でしょうか?
Posted at 2009.11.13 11:26 pm by tatata
Hi Danny,
How post-wall.php is loaded in the post edit page? $thisPage probably is not loaded properly. If I tried your code and set $thisPage = ‘people’, the radio buttons are displayed properly. So please think about how $thisPage is loaded.
Posted at 2009.11.14 5:24 pm by Wordpress Go Go
tatataさん、こんにちは。
そういうエラーが出たことがないので何とも言えないのですが、複数のブラウザで試されたでしょうか。どのブラウザをお使いでしょうか。Templateの中身もお知らせいただければ、こちらで試してみたいと思います。
Posted at 2009.11.14 5:28 pm by Wordpress Go Go
hi mate,
sorry about the post being in english.
just had a question. i have a select custom property. is it possible to make it so when someone selects something it automatically saves it instead of them having to click the save button?
Also is it possible to remove the initialize button?
thank you for your help :)
Jo
Posted at 2009.11.15 2:24 am by jo
Hello, problem solved!
I have added a “default” case and nw it works properly. Here’s the code (hope it could helps!)
in Template I have:
[Page]
type = radio
code = 0
in code 0
global $thisPage;
switch ($thisPage) {
case “wall”:
$values = array(‘wall’, ‘news’, ‘people’, ’showcase’); $default = ‘wall’;
break;
case “people”:
$values = array(‘wall’, ‘news’, ‘people’, ’showcase’); $default = ‘people’;
break;
case “showcase”:
$values = array(‘wall’, ‘news’, ‘people’, ’showcase’); $default = ’showcase’;
break;
case “news”:
$values = array(‘wall’, ‘news’, ‘people’, ’showcase’); $default = ‘news’;
break;
default :
$values = array(‘wall’, ‘news’, ‘people’, ’showcase’); $default = ‘wall’;
}
pass $thisPage in every page it is needed.
Thanks a lot for your help!
Posted at 2009.11.15 8:37 pm by Danny
テンプレートは、
[price]
label = 参加内容・料金
type = textarea
[order]
label = 申し込み方法
type = textarea
[caution]
label = 注意事項
type = textarea
[schedule]
label = スケジュール
type = textarea
といったtextareaを多用してます。
それぞれのテキストエリアに文字をたくさん入力するとURLが長すぎますとエラーが返されます。
ブラウザはfirefox3.6で、エラーはfirebugを使って確認してます。
Posted at 2009.11.16 12:51 pm by tatata
ブラウザのバージョンはfirefox3.5.5でした。。。
Posted at 2009.11.16 12:52 pm by tatata
Did you manage to fix the bug of meta keys not being deleted when a file is deleted?
I’m very excited to be using your plugin to develop a document management system for a high profile client – I’d love to just nail this last detail!
Posted at 2009.11.18 9:44 pm by Jonathan Alderson
tatataさん
お返事遅くなりました。エラーを確認いたしました。修正を試みてみますのでしばらくお時間をいただければ、と思います。
Posted at 2009.11.19 5:10 pm by Wordpress Go Go
Hi Jonathan,
I am sorry for my late reply. I probably fixed this bug in the latest version 1.4.9. So please try it out. Thanks.
Posted at 2009.11.19 5:11 pm by Wordpress Go Go
Hi Jo,
I am sorry for my late reply. There is no option to save data automatically. However, you can do it by using JavaScript. The idea is following. If the custom field template data change, the event handler which loads the save button click will be called.
I added the option to disable the initialize button. Please try it out.
Posted at 2009.11.19 5:19 pm by Wordpress Go Go
You are a *star* – I can’t live without having this plugin installed! :)
Posted at 2009.11.19 8:19 pm by Jonathan Alderson
Hi,
I am trying to use the multiple = true and multipleButton = true options to create a form to add multiple images for the same key. The problem is when I use the ‘Add New’ multiple button in the form, it doesn’t save any images past the initial two. This is what I am using:
[Choose Images]
type = file
relation = true
label = Image dimensions must be 748px wide by 498px high.
multiple = true
multipleButton = true
[Choose Images]
hideKey = true
type = file
relation = true
label = Image dimensions must be 748px wide by 498px high.
multiple = true
multipleButton = true
Am I doing something wrong, or did I misunderstand what the purpose of the multipleButton was for?
Thank you in advance!
Posted at 2009.11.21 1:22 pm by Dominic
I partially resolved my problem. I was mistakenly using both the old method of multiple keys with a hiddenKey and the multiple attribute. By only setting one key value for [Choose Images] with the multiple value set to true and multipleButton also true I now have it working.
However, I think I found a new problem/bug. The multipleButton and extra multiple field doesn’t show up in the post page if I include a fieldset in the template.
Here’s what I have now that causes the problem:
[set1]
type = fieldset_open
legend = Main Large Images
[Choose Images]
type = file
relation = true
label = Image dimensions must be 748px wide by 498px high.
multipleButton = true
multiple = true
[set1]
type = fieldset_close
Posted at 2009.11.26 6:07 am by Dominic
Hi Dominic,
If you want to make the multiple file upload fields, just use only one field with multiple and multipleButton attributes. You can add the `startNum` attribute to specify how many fields are set up at the beginning. Or just you need to change the field name. Thanks.
Posted at 2009.11.26 8:53 am by Wordpress Go Go
Hi Dominic,
It is not supported to use multiple attributes in the fieldset. You need to make as many fields as you want in the fieldset fron the beginning. Thanks
Posted at 2009.11.26 9:00 am by Wordpress Go Go
Is it possible to do a select list where the value is different from what’s displayed, IE:
Post 1
Post 2
Post 3
Posted at 2009.11.29 4:04 pm by King
Sorry the html got stripped, a select list like this:
value 1 – display post 1
value 2 – display post 2
value 3 – display post 3
Posted at 2009.11.29 4:05 pm by King
Hi King,
Yes, you can do that. please try to use the `valueLabel` attribute. Something like this:
[select]
type = select
value = a # o # b
valueLabel = apple # orange # banana
I hope this will work for you.
Posted at 2009.11.30 1:54 am by Wordpress Go Go
tatata さん
どうも遅くなりましたが、テキストエリアの文字数が多くなると保存ボタンでエラーが出る件を修正いたしました。最新の1.5をお試しいただければと思います。それではよろしくお願いします。
Posted at 2009.12.03 11:17 pm by Wordpress Go Go
Thanks for sharing this plug-in. I guess there is one problem with this. When a ‘\’ put in a post, the ‘\’ is not shown.
Do you know if there is a way to avoid the problem?
— Below is translated by Google Translator —–
このプラグインを共有するためのおかげです。私は、この1つの問題だと思います。ときに’\'の記事で言えば、’\'が表示されません。
がある場合はこの問題を回避するための方法であることを知っていますか?
Posted at 2009.12.04 4:17 am by bread
Hi bread,
I am sorry for my late reply. As you said, there is a bug the backslashes are not saved in the template fields. I probably fixed it and released the version 1.5.1. So please try it out. Thanks.
Posted at 2009.12.04 10:59 am by Wordpress Go Go
Thanks, Hiroaki,
However, I originally meant the_content() as well. In there, is it necessary to have that stripslashes($content)? Could you look it as well, please?
Posted at 2009.12.04 11:31 am by bread
File Uploadについて、
FORMAT #0 に記述して画像を表示する時に、
上記のような記述方法があると大変便利なのですが、ご検討いただけないでしょうか。
また、今の段階での代替案がありましたらご教授いただけると幸いです。
宜しくお願い致します。
Posted at 2009.12.04 11:43 am by ko
File Uploadについて、
FORMAT #0 に記述して画像を表示する時に、
<?php
the_attachment_link(‘[File Upload]‘);
?>
上記のような記述方法があると大変便利なのですが、ご検討いただけないでしょうか。
また、今の段階での代替案がありましたらご教授いただけると幸いです。
宜しくお願い致します。
Posted at 2009.12.04 11:45 am by ko
Hi bread,
I probably fixed the bug you mentioned. Please try to use the latest version 1.5.3. Thanks.
Posted at 2009.12.12 2:22 am by Wordpress Go Go
koさん、お返事遅くなりました。
ファイルのアップロードで、画像を読み込む方法ですが、簡単なところでいえば、以下のような感じでしょうか。
<?php
$thumbnail_id = get_post_meta($post->ID, ‘thumbnail_id’, true);
echo wp_get_attachment_image($thumbnail_id, ‘thumbnail’);
?>
結構面倒なのは確かですね。Format内ではもう少し簡単に呼び出せるように改良してみようと思います。しばらくお時間をいただければ、と思います。
Posted at 2009.12.12 2:25 am by Wordpress Go Go
Is it possible to automatically use the value from one of the custom fields in the template as the post title? I’m thinking of something similar to how insertTags works, except for the post title.
And thank you so much for this excellent plugin!!
Posted at 2009.12.24 7:52 am by Kathy
Man, I hate and love your plugin at the same time. Why does it drop all information from the post’s custom fields after I publish the post again?
e.g. the real case when the data is being dropped — the post was assigned to one category. Than I changed values for some custom fields and fill additional fields too, changed category and pressed Publish or Post from the draft whatever … and than all data becomes dropped
Posted at 2009.12.28 6:40 am by reaz
Hi Kathy,
I am sorry for my late reply. I have not tried it yet, but you may use the `editCode` attribute. In the PHP CODE section, probably you need to add the code to save the custom filed as the post title. I will try it if I have some time. Thanks.
Posted at 2009.12.28 7:23 pm by Wordpress Go Go
Hi reaz,
I have not encountered the case the data are not saved properly. Could you show me the template content? Does it happen every time?
Posted at 2009.12.28 7:30 pm by Wordpress Go Go
Thanks much… one more question for you: is there a way to include a read more link within the cft format? I am currently managing this by using multiple cft formats and placing a read more quicktag between the two cft shortcodes in the writing pane, but this is not ideal. Wondering if you have any ideas on this?
Thanks again for a truly wonderful plugin and your great support.
Posted at 2009.12.29 7:47 am by Kathy
Hi,
I installed the custom field template plugin and it worked great. Then I tried to import a template and it stopped working. All I get when I try to access the setup is:
Fatal error: Cannot use string offset as an array in /home/austin44/public_html/wp-content/plugins/custom-field-template/custom-field-template.php on line 772
Can you help???
Posted at 2010.01.06 8:44 am by TJ
Hi,
I really like the idea of this plugin and would definitely consider using it. However it does not work well when you change the order of the posts to random e.g. I put:
query_posts( ‘&orderby=rand’);
Just outside the loop and instead of showing all posts randomly it only shows the first post randomly (the remaining come in date order).
Is there a fix for this.
Thanks for a great plugin otherwise!
Posted at 2010.01.06 9:48 pm by David
I am trying to add demo links in my posts but they do not seem to appear as links. They just come out as plain text. Can you please let me know how to do that?
thanks!
Posted at 2010.01.08 8:26 pm by Pak Satire
Hi Kathy,
I am sorry for my late reply. About the read more link, it seems to be a little bit difficult to make it work. You need to write some php codes like the core function get_the_content. You can alse add the `outputCode` attribute and use the [cft] shortcode. I am not sure you can do it but try it out.
Posted at 2010.01.09 6:37 pm by Wordpress Go Go
Hi TJ,
Could you send me the exported file? I will try it in my test server. Send it to webmaster[[at]]wpgogo.com . Please change [[at]] into @. Thanks.
Posted at 2010.01.09 6:39 pm by Wordpress Go Go
Hi David,
I am sorry I could not understand what happened to you. Are you talking about [cft] shortcode or else? How do you display the custom fields? Let me know the detail of your situation. Thanks.
Posted at 2010.01.09 6:41 pm by Wordpress Go Go
Hi Pak,
This is an example:
TEMPLATE #0
[link]
type = text
FORMAT #0
<a href="[link]" rel=”nofollow”>Demo link</a>
After you set this, just you write down [cft format=0] into the post content. Please try it out.
Posted at 2010.01.09 6:48 pm by Wordpress Go Go
Thanks, now I am getting another problem.
There is a field I want to use which says compatible with. I have a few options for the compatibility. I tried using them in a one checkbox with various values and with multiple checkboxes and single values.
But i am getting them in an unordered list format where as I want them to be shown in a single line seperated with commas like this.
Compatibale With: software 1, software 3, software 7
Where as it shows like this.
Compatible With:
- software 1
- software 3
- software 7
Thanks for your help.
Posted at 2010.01.09 9:21 pm by Pak Satire
Hi Pak,
I tried what you want to do. Something like this:
TEMPLATE #0
[compatibility]
type = checkbox
value = software 1 # software 3 # software7
FORMAT #0 Check `Use PHP`
<?php
global $post;
$checkbox = get_post_meta($post->ID, 'compatibility', false);
echo implode(',', $checkbox);
?>
After that, you add [cft format=0] into the post content. please try it out.
Posted at 2010.01.09 10:43 pm by Wordpress Go Go
WordpressMU2.8.6を使用し、こちらのCustom Field Template pluginを導入し、ふたつのテンプレート(テスト1・テスト2
)を作成してテストしたところ
テスト1がはじめ、正常に表示されている
↓
テスト2へ切り替えタブを使用し切り替え
↓
テスト2は切り替わるが内容(入力フォーム)がまったく表示されない
↓
テスト1に切り替えタブを使用して元に戻す
↓
テスト1に切り替わるが内容(入力フォーム)がまったく表示されない
以上のような現象が起きてしまいます。
フォームの内容はデフォルトのものを分割しただけで、オプションなどもデフォルトのままです。
正常に動くにはどうしたらよいでしょうか?
大変申し訳ないですが、出来れば早急に教えていただけると助かります。
Posted at 2010.01.13 12:36 pm by てら
てらさん、こんにちは。
さて、WordPress MUでも試してみましたが、カスタムフィールドテンプレートの切り替えは問題なく行える感じでした。
デフォルトのものを分割とありますが、どのように記載されておりますでしょうか。変なところで分断されて、うまく動作していないということはありませんでしょうか。
それではよろしくお願いします。
Posted at 2010.01.13 4:28 pm by Wordpress Go Go
早速のご返答ありがとうございます。
テスト1には
[Miles Walked]
type = radio
value = 0-9 # 10-19 # 20+
default = 10-19
clearButton = true
[Temper Level]
type = select
value = High # Medium # Low
default = Low
[Hidden Thought]
type = textarea
rows = 4
cols = 40
tinyMCE = true
htmlEditor = true
mediaButton = true
[File Upload]
type = file
テスト2には
[Plan]
type = text
size = 35
label = Where are you going to go?
[Plan]
type = textfield
size = 35
hideKey = true
[Favorite Fruits]
type = checkbox
value = apple # orange # banana # grape
default = orange # grape
としてあります。
こちらに何か問題がありますか?
自動アップグレード表記がありましたので
アップグレードしましたが、やはり表示されません。
Posted at 2010.01.13 11:04 pm by てら
試してみましたが、問題はなさそうです。
何かJavaScriptのエラーは出ていませんか。
おそらく他のプラグインで相性が悪いものがあるのではないでしょうか。
ためしにほかのプラグインを全て無効にしてやってみてください。
Posted at 2010.01.13 11:12 pm by Wordpress Go Go
すべてのプラグインを無効にし実行したら
正常に実行されました。
その上で、ひとつずつ、有効にしたところ
「Category Limitation」というプラグインとの相性が悪かったようです。
ただ、こちらのプラグインも現状必要なので
どちらかの代用を探してみます。
お手数おかけいたしました。
ありがとうございました。
Posted at 2010.01.13 11:24 pm by てら
Hi,
I’m in need of a simple Mandatory Field option for the plug in, I tried using the PHP code option but the best I could come up with is this.
[Name]
type = text
size = 30
label = Name
editCode = 0
code #0
if (empty($value))
{
break; // to stop saving
$value = ‘Please enter your name’;
// some highlight or CSS change to show the error.
} else
{
//just save
$value = $value;
}
however, by using break; I’m encountering issues.
Any help or guidance on how to achieve a mandatory setting will be a great help.
Posted at 2010.01.19 7:13 pm by Evan
Hi Evan,
Let me have some time to think the mandatory field option. I will consider to add the functionality in the future release. Thanks.
Posted at 2010.01.21 9:27 am by Wordpress Go Go
Hi Hiroaki,
When I use a file upload field in a post like the following:
[Thumbnail ID]
type = file
relation = true
label = Thumb
After uploading an image, the post admin area stops parsing up to:
`
Custom Field Template
`
I’m currently using CFT 1.5.5 and WP 2.7.1.
I’m going to try downgrading CFT to see if this problem goes away.
Posted at 2010.01.22 2:36 pm by Ray
Hi Hiroaki,
The comment parsed out the HTML.
I meant to write:
After uploading an image, the post admin area stops parsing up to:
[div id="cftdiv" class="postbox " ]
[div class="handlediv" title="Click to toggle"][br /][/div][h3 class='hndle'][span]Custom Field Template[/span][/h3]
[div class="inside"]
Posted at 2010.01.22 2:44 pm by Ray
Okay, found out that the newer versions of CFT uses 1 instance of esc_attr(), which is only available in WP 2.8+.
I’ve switched esc_attr() with the deprecated attribute_escape() function and it works now.
Posted at 2010.01.22 3:28 pm by Ray
Hi. I’m having trouble in showing the file type field in frontend. My template has a file type, but it is not visible in the front end; rest of the fields are visible. I also attached the file to the post from the WP media manager (is this required ?) but still I am unable to. Do I have to do something so that it is visible ? Thanks
Posted at 2010.01.25 3:27 am by Nilay
Hi Ray,
I am sorry I used the incompatible function. I changed it to attribute_escape() function in version 1.5.6. Please upgrade. Thanks.
Posted at 2010.01.25 10:04 am by Wordpress Go Go
Hi Nilay,
Please take a look the following links. There are hints for you. Thanks.
http://wordpress.org/support/topic/327620
http://wordpress.org/support/topic/354547
http://wordpress.org/support/topic/348526
Posted at 2010.01.25 10:15 am by Wordpress Go Go
would be nice if you can make a auto-generated droplist to select a file from the media library, for example:
[thumbnail]
type = media-library
Or an auto-generated droplist with the current categories.
What do you think?
Posted at 2010.02.01 6:35 am by Roberto
Hi Roberto,
Thank you for your suggestion. Probably if you use the `code` attribute, you can achieve your purposes. However, I will consider to add the functionalies if in demand. Thanks.
Posted at 2010.02.02 10:46 am by Wordpress Go Go
HI Hiroaki,
Thanks for the excellent work and support. I’m looking to implement logic to set the contents of a field, if it is blank, based on those of another field. I suspect that PHP code is the way to go. Are the shortcodes the means to reference other fields? Guidance would be most appreciated.
Thanks
Posted at 2010.02.06 9:34 am by Steve
お世話になっております。
仕様かどうか分からないのですが、不具合のご報告です。
下記のように、チェックボックスのvalueにHTMLタグを入れると不具合が生じてしまいます。
[aaa]
type = checkbox
value =
投稿時にチェックボックスにチェックして更新すると、チェックボックスが勝手に外れてしまうのですが、ページ上では表示はしっかりされています。
しかしその後、チェックボックスが外れた状態で更新しても、ページ上の表示が消えなくなってしまいました。
たしか以前のバージョンで試したときにできたような記憶がありますので、ご報告致します。
画像やリンクを表示させたい場合にはこれができると便利ですので、ご確認いただけると幸いです。
Posted at 2010.02.07 4:10 am by tokki
Hi, i’ve figured out, how to list posts for e.g. connecting posts to each other by custom fields. Use this with a checkbox or selectbox!
$myposts=get_posts('cat=4&numberposts=-1&orderby=date&order=DESC');
$val=array();
$vallabel=array();
foreach($myposts as $mypost){
$val[]=$mypost->ID;
$vallabel[]=$mypost->post_title;
}
$values=$val;
$valueLabel=$vallabel;
Posted at 2010.02.07 11:05 am by Basti
Hi Steve,
I am not sure what you want to do. Could you tell me the detail about it? I may give you some hints. Thanks.
Posted at 2010.02.07 1:40 pm by Wordpress Go Go
tokkiさん、どうもこんにちは。
"(クオテーションマーク)があるとうまくいかなくなるようでしたので、1.5.7で修正しました。どうぞお試しください。
Posted at 2010.02.07 1:41 pm by Wordpress Go Go
Hi again. Thanks for pointing to the relevant pages. It seems to have worked for others, but doesn’t work for me; ma be I don’t understand. A solution says to add ‘ID, ‘thumbnail_id’, true);
echo wp_get_attachment_image($thumbnail_id, ‘thumbnail’);
?>’ but I don’t know where to add this. I’ve added this in ‘[cft] and [cftsearch] shortcode format’ but it does not work.
Posted at 2010.02.08 1:14 am by Nilay
Well, sorry for the above post. Code does not seem to work here, but I’m referring to http://wordpress.org/support/topic/348526 . I’ve asked there as well, but I’m running over deadline, which is why I’m asking here again. Thanks
Posted at 2010.02.08 1:17 am by Nilay
Hi Nilay,
I replied to your question in the WordPress forum. Just add `global $post;`. This should work. Thanks.
Posted at 2010.02.08 1:30 am by Wordpress Go Go