External API to WP
-
I have my own api of metadata(external to wp), and I would like to read some data through my api and show it on my WP Site.
I have been using the method wp_remote_get of the HTTP WP API. But I have two questions.
In what section should I place that requests, in functions.php? maybe making a plugin (seems a little hard)?, or with a plugin posting PHP on specific pages?
The other question: When I use the wp_remote_retrieve_body it returns a String with the body of the JSON, how I print it in a nice way and not like an ugly string?
Thanks in advance.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘External API to WP’ is closed to new replies.