When you want to edit the advanced custom fields for a WordPress blogpost, you must first install the ACF to REST API plugin.

 

 

For sending authenticated POST request I used the JWT Autentication for WP-API plugin.

(see https://www.roelvanlisdonk.nl/2018/06/18/how-to-create-wordpress-blog-posts-from-c-with-httpclient-and-the-wordpress-rest-api-on-docker-for-windows-10/)

 

Now I have created a blogpost in WordPress and filled the advanced custom field: “my-field-1” with value: “value 1”.

The blogpost Id = 15.

 

To update the value, I used the following code:

 

 

 

 

 

 

 

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.