Hi @rarcher30,
All natives endpoints of WordPress expose the Advanced Custom Fields, like:
http://localhost/wp-json/v2/posts/{post_id}
Other endpoints:
https://github.com/airesvsg/acf-to-rest-api#endpoints
Thanks
Hey guys,
I’m able to use the endpoints, but there is a crucial difference between the native endpoint and ACF endpoint:
1. I need the custom field (photo) URL in the JSON, but the native API only returns numbers (I’m assuming they are field IDs), like this: "foto_do_aluno":["513","513"],"_foto_do_aluno":["field_5922eb4fd4e36","field_5922eb4fd4e36"]
2. ACF endpoint returns the url correctly, but not the other native fields (title, etc): "acf":{"foto_do_aluno":"http:\/\/localhost\/profuncionario\/wp-content\/uploads\/2017\/08\/Gabriela-Rodrigues-dos-Santos-1-500x500.jpg",
How to have both the native fields (like “title”) and the custom field photo URL?
Hi @marcosaccioly,
The native endpoint answer isn’t right.
Whats the versions of WordPress and ACF?
Thanks
@marcosaccioly Please, update your WordPress and ACF.
Can you send me your files and database dump? I’ll test in my local.
[email protected]
Thanks
-
This reply was modified 8 years ago by
airesvsg.