I'm trying to get recent posts from my wordpress blog but it's returning html instead of json. I want to use json to make it easier to access the blog contents. I already have the plugin installed and activated. Here's what I do to get the posts:
$http.get('blog/?json=get_recent_posts')
.success(function(data, status, headers, config){
$scope.post = data;
console.log(data);
})
.error(function(data, status, headers, config){-
console.log("unable to access!!!!!!!!!!!");
});
What's the reason that it's returning html instead of json? Are there any workarounds? Some other posts mentioned using jsonp but that did not work for me either.