custom fields in post(create,update)
-
from:
<input name=”custom_fields[lwygoods]” value=”” type=”text”>json-api\models\post.php -> function save
if (!empty($values[‘custom_fields’])) {
$custom_fields = $values[‘custom_fields’];
foreach ($custom_fields as $key => $value) {
//echo $this->id,'</br>’;
//echo $key,'</br>’;
//echo $value,'</br>’;
update_post_meta($this->id, $key, $value);
}
}
but create post success donot show custom_fields .
In fact, it has been to create success.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘custom fields in post(create,update)’ is closed to new replies.