Closed iMohamedSamir closed 5 years ago
@airesvsg I think its not duplicated, in https://github.com/airesvsg/acf-to-rest-api/issues/289 (Which I commented on, if this is the one you reference as a similar issue) the author was getting an error, I am not getting anything at all. I think you need to reconsider this label, and if possible to help me.
Funny enough I found the "hacky" solution in https://github.com/airesvsg/acf-to-rest-api/issues/177 idk why it works, but it works, weirdly enough its just 1 item per request, fortunately I only have one field to post/put just found out you can post/put multiple fields per request, just add & between every fields[fieldname]=fieldvalue
.
Not so helpful author tbh
For the future reader: you have to update it via url request, not in the body, don't even try, nor v2 or v3 seemed to work with us
Did you try: {"fields": {"sourceurl": "https://example.com"}
@nourseofcourse tried it and it worked, thanks a lot
Trying to post/put custom field named
sourceurl
with no luck at all when I GET posts I get this:'acf': {'sourceurl': None},
I tried to query it onhttp://localhost/wp-json/wp/v2/posts/1717
and the same endpoint but with v3 andapplication/json
in the headers like this:"acf": {"sourceurl": "https://example.com'}
, and this"sourceurl": "https://example.com'
, didn't work. I don't know if this problem with me or its an issue.I am working with this plugins: JSON Basic Authentication Advanced Custom Fields ACF to REST API, Obviously