Skip Navigation

[Resolved] REST API update custom fields

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 6 voices.

Last updated by ioannisM-2 7 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#507541

Hi

I am trying to view and update custom fields via REST API. I am able to view and update custom taxonomies with your help from this ticket:

https://toolset.com/forums/topic/rest-api-update-custom-posts/

add_filter('wpcf_taxonomy_data', 'add_rest_api_func', 10, 3);
function add_rest_api_func($data, $taxonomy, $object_types){
if(in_array($taxonomy, array('test-tax1', 'test-tax2'))){
$data['show_in_rest'] = 1;
}
return $data;
}

Can someone please help me updating custom fields via REST API?

Thanks

#507744

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - this is pure custom programming and that is beyond the scope of our support policy.

Still I have few articles to share with you which you can use as reference:
=> https://www.gavick.com/blog/adding-custom-fields-in-the-wordpress-rest-api
=> https://code.tutsplus.com/tutorials/wp-rest-api-creating-updating-and-deleting-data--cms-24883

If you want custom programming for your project, Please feel free to contact our certified partners.
=> https://toolset.com/consultant/

#508548
#545283

Can inclusion of custom meta in REST feeds also be raised as a feature request?

Minimally, outputting the fields in unserialized format would be an appreciated addition. Further, the ability to select output formatting of certain field types (e.g. dates) would be nice.

#545292

+1 for feature request.

#563397

Jay

+1 for feature request

#600676

+1 for feature request

The forum ‘Types Community Support’ is closed to new topics and replies.