I have the following code:
// Jquery Script
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
// JS Script
$.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 can not load link The 'Access-Control-Allow-Origin' header has a value ' link ' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access. "
How to receive the error-free call date and only display the title of the posts?