ワードプレスのサイトがあり、ダッシュボードに新しいメニュー項目を追加しました。プロパティには、場所、価格などのメタフィールドのリストがあります。
しかし、これにも添付ファイルプラグインを追加したいので、新しい単一のプロパティごとに、設定した画像ギャラリーの添付ファイルを追加できます。どうすればよいですか?
これに関する詳細情報として、functions.phpでこれを定義しました。
$property->add_meta_box(
'Property Info',
array(
array(
'name' => 'price',
'label' => 'Price',
'description' => 'Leave Blank for TBC',
'type' => 'text'
),
array(
'name' => 'bedrooms',
'label' => 'Bedrooms',
'type' => 'text'
),
array(
'name' => 'location',
'label' => 'Location',
'type' => 'select',
'options' => get_array_of_locations(),
),
array(
'name' => 'property_type',
'label' => 'Type',
'type' => 'select',
'options' => get_array_of_property_types(),
),
array(
'name' => 'postcode',
'label' => 'Postcode',
'type' => 'text',
),
)
);
しかし、新しい$propertyにhttp://wordpress.org/extend/plugins/attachments/installation/を追加する方法がわかりません。