0
I have the following code:
// Script Jquery
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
// Script JS
$.ajax({
type: "GET",
url: "http://revistadesignmagazine.com/wp-json/wp/v2/posts",
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(thrownError);
}
}).done(function ( data ) {
console.log(data);
});
When I make the call I get the following error:
"Xmlhttprequest cannot load http://revistadesignmagazine.com/wp-json/wp/v2/posts. The 'Access-Control-Allow-Origin' header has a value 'http://null' that is not Equal to the supplied origin. Origin 'null' is therefore not allowed access."
How to receive the call date without errors and display only the post title?
There is no way Julio, this is coming from Wordpress
– Hitch Leonardo