Support

Account

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. 🙁