How to edit value in custom fields?
uyin85 opened this issue · comments
uyin85 commented
How to edit custom field value?
- I search post id.
- After found post id, search specific custom field to edit the value.
- Execute below code but only title change. Custom field value not change.
post = WordpressPost() post.title = 'Bumblebee' post.custom_fields = [{'key':'idtmdb', 'value':'1234'}] client.call(posts.EditPost(16, post))
ownchoice commented
I'm having the same problem right now.
ownchoice commented
I managed to make it work!
You need to submit the custom field dict
including the id
.
post = WordpressPost()
post.title = 'Bumblebee'
post.custom_fields = [{'id':'28322', 'key': 'idtmdb', 'value': '1234'}]
client.call(posts.EditPost(16, post))
uyin85 commented
Thank you!
Need to add custom_fields id in dict.