I have this wordpress site with a plugin called JSON API. This plugin provides a JSON format for the content that is in the wordpress. I was able to enable CORS on the wordp
In wordpress goto plugins > JSON API > Edit
From the right hand file selection select
json-api/singletons/api.php
You will need to add the following line
header("Access-Control-Allow-Origin: *");
Your code should look similar to this once done. Adding this line anywhere else might not work as expected.
query = new JSON_API_Query();
$this->introspector = new JSON_API_Introspector();
$this->response = new JSON_API_Response();
add_action('template_redirect', array(&$this, 'template_redirect'));
add_action('admin_menu', array(&$this, 'admin_menu'));
add_action('update_option_json_api_base', array(&$this, 'flush_rewrite_rules'));
add_action('pre_update_option_json_api_controllers', array(&$this, 'update_controllers'));
}
function template_redirect() {