• Hi,
    I’m trying to use wp api v2 endpoint for save new posts(and update) for a wordpress.
    I can save normal post data … but I need save too the meta custom fields…
    The problem is… this doesnt works… custom fields arent save in DB

    Anyone can help me ?

    thanks

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Yeah, meta data is a little different. You must explicitly expose to the API the meta data you want to get or manipulate. See https://developer.ww.wp.xz.cn/rest-api/extending-the-rest-api/modifying-responses/

    The reason for this is some installations can have a ton of meta data which, if all was arbitrarily sent with post requests, could significantly increase the data transmitted, slowing down the entire process. By requiring us to expose meta data we’re interested in to the API, the amount of data sent for any given request will be much more efficient.

Viewing 1 replies (of 1 total)

The topic ‘REST API v2 – post (save) custom fields’ is closed to new replies.