• 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.

    https://www.ads-software.com/plugins/json-api/

Viewing 1 replies (of 1 total)
  • Thread Starter 褚 找钱

    (@heisehuanyun)

    if thumbnail

    <input value=”435″ name=”custom_fields[_thumbnail_id]” class=”wpfepp-thumbnail-id wpfepp-form-field” type=”text”>

    435 thumbnail’s ID

Viewing 1 replies (of 1 total)
  • The topic ‘custom fields in post(create,update)’ is closed to new replies.