[Plugin: JSON API] Creating post with a value for its custom_field
-
hi all,
firstly great to be here and I love this JSON API plugin!I have a short question though, and hoping someone can help me out:
In order to create a new post we do this:
https://localhost/public_html/website/?json=posts/create_post&dev=1&nonce=eaa7969ea5&categories=competitions,photos&title=hello%20world%204&content="mycontent"&custom_fields=1&status=publish
By setting
custom_fields=1
, we can get the custom field object in the Post Response Object.I was wondering how can we create a post, with a specific value for its custom field?
Take for instance, i have a custom_field and the key is competition.
And I want to give it a value “summer”So perhaps i can do something like this:
https://localhost/public_html/website/?json=posts/create_post&dev=1&nonce=eaa7969ea5&categories=competitions,photos&title=hello%20world%204&content="mycontent"&custom_fields=competition:summer&status=publish
But the above request will not work, since this is not supported?I was wondering how can i creat a post with a specific value forits custom field ?
Thanks in advance!
- The topic ‘[Plugin: JSON API] Creating post with a value for its custom_field’ is closed to new replies.