How to run wp_remote_get() inside of a loop for multiple page API response?
If I’m reading the docs right, wp_remote_get() will return a WP_Error on failure, but not necessarily on a 404/400/403 (etc) status code from your remote server. (Though that will depend in part on what your remote server sends back if there’s an invalid request.) You can check the status code using wp_remote_retrieve_response_code(). I’d use something … Read more