Saltar navegación

[Resuelto] Update CPT Custom Fields via Rest API

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

I am attempting to update a Custom Post Type's custom fields using the WP Rest API with the toolset-meta object, but I cannot find documentation on how to perform a PUT operation.

Solution:

The Toolset wrapper for custom fields does not support editing via the Rest API. Use native WordPress functions to access and update the custom fields, just like any other native WordPress field.

Relevant Documentation:

https://developer.wordpress.org/rest-api/

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Christopher Amirian 1 year, 9 months ago.

Asistido por: Christopher Amirian.

Autor
Mensajes
#2720099

I am attempting to update a CPT's custom fields using the WP Rest API and the toolset-meta object. I have not been able to find documentation on how to perform a PUT operation. Please advise.

#2720701

Christopher Amirian
Colaborador

Idiomas: Inglés (English )

Hi there,

The Toolset wrapper for the custom fields does not support the edit functionality via Rest API.

You will need to use the native WordPress functions to access the fields and update them like any other native custom WordPress field.

Thanks.