Home › Forums › Backend Issues (wp-admin) › Is it actually possible to populate custom fields via the REST API? › Reply To: Is it actually possible to populate custom fields via the REST API?
I manage to trace issue to code
//Filter results.
if ( $filter && $posts ) {
var_dump($filter);
return $this->filter_posts( $posts, $filter );
In the file class-acf-internal-post-type.php, within the get_posts function, I believe the post_id used in the filter is invalid, as it points to a media post ID rather than an ACF post. I don’t know the internals of ACF, but after removing it, the ACF values appeared in the JSON API. However, this may break other things.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.