Closed dburk2 closed 3 months ago
I just figured this out.
The following snippet seems to work:
var post = new Post
{
Id = 18,
Meta = new Dictionary<string, string>
{
["my-custom-key"] = "some value"
},
};
await client.Posts.UpdateAsync(post);
Please note that all meta keys need to be registered using register_post_meta()
before you can use them, e.g.
register_post_meta('post', 'my-custom-key', [
'type' => 'string',
'single' => true,
'show_in_rest' => true,
]);
this would be a good addition to the docs as well
this would be a good addition to the docs as well
I will create a PR for that.
Is there a way to send an additional custom field value (other than Content, Excerpt, etc.) using the library via API? thanks