Home › Forums › ACF PRO › Getting data from JSON – ACF Plugin › Reply To: Getting data from JSON – ACF Plugin
@hube2 Thanks for the answer!
I’ve tried to mess around with it and I was thinking about the part that you said how and where the JSON is stored and I came up with this:
$json_url = get_field('field_of_json_url', $post_id);
$request = wp_remote_get( $json_url );
if( is_wp_error( $request ) ) {
return false;
}
$contents = wp_remote_retrieve_body( $request );
but now the problem I have is where and how I have to put and run the code you gave me? I’ve tried a lot but nothing happened. I’ve event read the update_field() document over and over but couldn’t understand it. 🙁
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.