I have two WordPress sites on separate domains. I need to expose the latest posts within a category via a json feed on one site that I have to use for the other site. I'll need to hit a "hidden" url, ex:
/themes/mytheme/json_api.php?cat=news to get the json response.
I'd like this json feed to be a unique page without header.php and only includes the code necessary to output the posts within a specific category. What do I need to import to have access to
WP_Query in this file?